Copyright: Compiled by Gerben Hoekstra - version 1.01


HTML 4.0 Reference

HTML 4.0 Reference

HTML 4.0 became a W3C Recommendation in December of 1997. The new HTMLstandard provides a number of significant improvements over previous versions of the language while emphasizing the concepts of accessibility and structural markup.

Contents

What's New in HTML 4.0

A summary of the new features in HTML 4.0 and a look at the key concepts behind the new standard.

Structure of an HTML 4.0 Document

An explanation of elements, tags, and attributes, and how they are used in an HTML 4.0 document.

Organizational List of HTML 4.0 Elements

All HTML 4.0 elements organized by their function.

Alphabetical List of HTML 4.0 Elements

All HTML 4.0 elements listed alphabetically.

HTML 4.0 Entities

All character entity references in HTML 4.0 along with their numeric character references.

Offline Versions

Downloadable versions of this reference suitable for offline use.

Maintained by Liam Quinn <liam@htmlhelp.com>

 Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


What's New in HTML 4.0

What's New in HTML 4.0

u New Elements in HTML 4.0

u Separation of Structure and Presentation

u Accessibility

u Internationalization

u Style Sheets

u Client-side Scripting

u Frames

u Advanced Tables

New Elements in HTML 4.0

The following elements are new in HTML 4.0:

u ABBR - Abbreviation

u ACRONYM - Acronym

u BDO - BiDi override

u BUTTON - Button

u COL - Table column

u COLGROUP - Table column group

u DEL - Deleted text

u FIELDSET - Form control group

u FRAME - Frame

u FRAMESET - Frameset

u IFRAME - Inline frame

u INS - Inserted text

u LABEL - Form field label

u LEGEND - Fieldset caption

u NOFRAMES - Frames alternate content

u NOSCRIPT - Alternate script content

u OBJECT - Object

u OPTGROUP - Option group

u Q - Short quotation

u S - Strike-through text

u SPAN - Generic inline container

u TBODY - Table body

u TFOOT - Table foot

u THEAD - Table head

Separation of Structure and Presentation

By deprecating many presentational features from HTML 3.2 and adding hooks for style sheets, HTML 4.0 encourages separating a document's structure from its presentation. This concept is key to understanding HTML 4.0.

When authors use HTML to markup a document's structure and style sheets to suggest the document's presentation, they can more easily achieve the device-independence that helped bring HTML its initial popularity. A document with a rich structure can be presented in many different ways on different media, allowing the document to adjust to new technologies such as phone or in-car aural browsers. The separation of content and presentation also allows authors to change the presentation of an entire site by editing a single style sheet, providing significant advantages in site maintenance.

Accessibility

Many of HTML 4.0's improvements in the area of accessibility follow from its emphasis on the separation of structure and presentation. When HTML is used structurally, a document can adapt to different browsing environments, accommodating large fonts, special colors, speech synthesizers, and Braille tactile feedback devices. This adaptability allows blind, low-vision, colorblind, and cognitively-challenged users access to the Web, opening a door for the world's 600 million disabled people.

HTML 4.0 includes many new elements and attributes aimed at improving the Web's accessibility. The multi-dimensional nature of HTML tables has long posed problems for non-visual browsing, but new attributes on the TABLE, TH, and TD elements allow table summaries and a more explicit association between a cell and its header information. These attributes give non-visual browsers the ability to render a cell's header information, possibly in an abbreviated form, before giving the cell's content.

New elements in HTML 4.0 also bring accessibility improvements to forms. The new FIELDSET element allows form controls to be grouped together and the LEGEND element provides a caption for the group. By grouping related form controls, authors allow those with non-visual browsers to more easily navigate complicated forms. As well, the new LABEL element associates a text label with a form control so that users can more easily determine what information is required in a given field.

Other accessibility improvements include full image descriptions through the LONGDESC attribute on the IMG element, rich alternatives to images and videos through the OBJECT element, and richer alternatives to image maps through a new content model for the MAP element.

Internationalization

To allow representation of the world's languages, HTML 4.0 adopts the Universal Character Set as its character set. Previous versions of HTML were restricted to ISO-8859-1, a character set that only handled some western European languages. The Universal Character Set is character-by-character equivalent to Unicode 2.0 and contains characters for almost all of the world's languages.

The LANG and DIR attributes are new in HTML 4.0 and apply to almost all elements. These attributes allow authors to specify the language and directionality of text. The BDO element allows authors to override the bidirectional algorithm used when right-to-left text such as Hebrew is presented.

HTML 4.0 also offers new entities for easy entry of mathematical symbols and Greek letters as well as other special characters.

Style Sheets

HTML 4.0 adds new hooks for style sheets, which suggest how a document is presented. The new ID, CLASS, and STYLE attributes allow style information to be attached to specific elements. The LINK and STYLE elements have new TYPE and MEDIA attributes for specifying the style sheet language and target media, respectively.

Client-side Scripting

HTML 4.0 embraces client-side scripting through the addition of a number of new attributes. The SCRIPT element now includes attributes for specifying the scripting language, embedding an external script, and deferring execution of a script. As well, a number of event attributes have been added to enable execution of a script upon events such as the user clicking an element, pressing a key, moving the mouse over an element, or changing the value of a form control.

The NOSCRIPT element, also new in HTML 4.0, provides alternate content for browsers with client-side scripting disabled or not supported.

Frames

The inclusion of frames in HTML 4.0 gives authors the ability to present multiple documents in one window. The frames model used in HTML 4.0 is not changed from the flawed frames model originally proposed by Netscape.

Advanced Tables

The simple table model of HTML 3.2 is expanded in HTML 4.0 to include row and column groups, greater flexibility in defining a table's rules, and accessibility improvements. The use of row groups (THEAD, TFOOT, TBODY) allows visual browsers to render static header and footer rows with scrollable body rows, thus improving the readability of large tables.

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


Structure of an HTML 4.0 Document

Structure of an HTML 4.0 Document

u Elements and Tags

u Attributes

u Special Characters

u Comments

u A Complete HTML 4.0 Document

u Validating your HTML

Elements and Tags

Elements are the structures that describe parts of an HTML document. For example, the P element represents a paragraph while the EM element gives emphasized content.

An element has three parts: a start tag, content, and an end tag. A tag is special text--"markup"--that is delimited by "<" and ">". An end tag includes a "/" after the "<". For example, the EM element has a start tag, <EM>, and an end tag, </EM>. The start and end tags surround the content of the EM element:

<EM>This is emphasized text</EM>

Element names are always case-insensitive, so <em>, <eM>, and <EM> are all the same.

Elements cannot overlap each other. If the start tag for an EM element appears within a P, the EM's end tag must also appear within the same P element.

Some elements allow the start or end tag to be omitted. For example, the LI end tag is always optional since the element's end is implied by the next LI element or by the end of the list:

<UL>
  <LI>First list item; no end tag
  <LI>Second list item; optional end tag included</LI>
  <LI>Third list item; no end tag
</UL>

Some elements have no end tag because they have no content. These elements, such as the BR element for line breaks, are represented only by a start tag and are said to be empty.

Attributes

An element's attributes define various properties for the element. For example, the IMG element takes a SRC attribute to provide the location of the image and an ALT attribute to give alternate text for those not loading images:

<IMG SRC="wdglogo.gif" ALT="Web Design Group">

An attribute is included in the start tag only--never the end tag--and takes the form Attribute-name="Attribute-value". The attribute value is delimited by single or double quotes. The quotes are optional if the attribute value consists solely of letters in the range A-Z and a-z, digits (0-9), hyphens ("-"), and periods (".").

Attribute names are case-insensitive, but attribute values may be case-sensitive.

Special Characters

Certain characters in HTML are reserved for use as markup and must be escaped to appear literally. The "<" character may be represented with an entity, &lt;. Similarly, ">" is escaped as &gt;, and "&" is escaped as &amp;. If an attribute value contains a double quotation mark and is delimited by double quotation marks, then the quote should be escaped as &quot;.

Other entities exist for special characters that cannot easily be entered with some keyboards. For example, the copyright symbol ("©") may be represented with the entity &copy;. See the Entities section for a complete list of HTML 4.0 entities.

As an alternative to entities, authors may also use numeric character references. Any character may be represented by a numeric character reference based on its "code position" in Unicode. For example, one could use &#169; for the copyright symbol or &#1575; for the Arabic letter ALEF.

Comments

Comments in HTML have a complicated syntax that can be simplified by following this rule: Begin a comment with "<!--", end it with "-->", and do not use "--" within the comment.

<!-- An example comment -->

A Complete HTML 4.0 Document

An HTML 4.0 document begins with a DOCTYPE declaration that declares the version of HTML to which the document conforms. The HTML element follows and contains the HEAD and BODY. The HEAD contains information about the document, such as its title and keywords, while the BODY contains the actual content of the document, made up of block-level elements and inline elements. A basic HTML 4.0 document takes on the following form:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"
        "http://www.w3.org/TR/REC-html40/strict.dtd">
<HTML>
  <HEAD>
    <TITLE>The document title</TITLE>
  </HEAD>
  <BODY>
    <H1>Main heading</H1>
    <P>A paragraph.</P>
    <P>Another paragraph.</P>
    <UL>
      <LI>A list item.</LI>
      <LI>Another list item.</LI>
    </UL>
  </BODY>
</HTML>

In a Frameset document, the FRAMESET element replaces the BODY element.

Validating your HTML

Each HTML document should be validated to check for errors such as missing quotation marks (<A HREF="oops.html>Oops</A>), misspelled element or attribute names, and invalid structures. Such errors are not always apparent when viewing a document in a browser since browsers are designed to recover from an author's errors. However, different browsers recover in different ways, sometimes resulting in invisible text on one browser but not on others.

The W3C HTML Validation Service checks the validity of HTML 4.0 documents.

Note that some programs claim to be validators but really are not. A validator checks a document against a formal document type definition (DTD) while other programs such as lints warn about valid but unsafe HTML. Both kinds of programs are useful, but validation should never be forgotten.

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


HTML 4.0 Elements

HTML 4.0 Elements

The following is an organizational list of all HTML 4.0 elements. An alphabetical list is also available.

Top-level Elements

u HTML - HTML document

u HEAD - Document head

u BODY - Document body

u FRAMESET - Frameset

Head Elements

u BASE - Document base URI

u ISINDEX - Input prompt

u LINK - Document relationship

u META - Metadata

u SCRIPT - Client-side script

u STYLE - Embedded style sheet

u TITLE - Document title

Generic Block-level Elements

u ADDRESS - Address

u BLOCKQUOTE - Block quotation

u CENTER - Centered block

u DEL - Deleted text

u DIV - Generic block-level container

u H1 - Level-one heading

u H2 - Level-two heading

u H3 - Level-three heading

u H4 - Level-four heading

u H5 - Level-five heading

u H6 - Level-six heading

u HR - Horizontal rule

u INS - Inserted text

u ISINDEX - Input prompt

u NOSCRIPT - Alternate script content

u P - Paragraph

u PRE - Preformatted text

Lists

u DIR - Directory list

u DL - Definition list

u DT - Definition term

u DD - Definition description

u LI - List item

u MENU - Menu list

u OL - Ordered list

u UL - Unordered list

Tables

u TABLE - Table

u CAPTION - Table caption

u COLGROUP - Table column group

u COL - Table column

u THEAD - Table head

u TFOOT - Table foot

u TBODY - Table body

u TR - Table row

u TD - Table data cell

u TH - Table header cell

Forms

u FORM - Interactive form

u BUTTON - Button

u FIELDSET - Form control group

u LEGEND - Fieldset caption

u INPUT - Form input

u LABEL - Form field label

u SELECT - Option selector

u OPTGROUP - Option group

u OPTION - Menu option

u TEXTAREA - Multi-line text input

Special Inline Elements

u A - Anchor

u APPLET - Java applet

u BASEFONT - Base font change

u BDO - BiDi override

u BR - Line break

u FONT - Font change

u IFRAME - Inline frame

u IMG - Inline image

u MAP - Image map

u AREA - Image map region

u OBJECT - Object

u PARAM - Object parameter

u Q - Short quotation

u SCRIPT - Client-side script

u SPAN - Generic inline container

u SUB - Subscript

u SUP - Superscript

Phrase Elements

u ABBR - Abbreviation

u ACRONYM - Acronym

u CITE - Citation

u CODE - Computer code

u DEL - Deleted text

u DFN - Defined term

u EM - Emphasis

u INS - Inserted text

u KBD - Text to be input

u SAMP - Sample output

u STRONG - Strong emphasis

u VAR - Variable

Font Style Elements

u B - Bold text

u BIG - Large text

u I - Italic text

u S - Strike-through text

u SMALL - Small text

u STRIKE - Strike-through text

u TT - Teletype text

u U - Underlined text

Frames

u FRAMESET - Frameset

u FRAME - Frame

u NOFRAMES - Frames alternate content

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


HTML 4.0 Elements

HTML 4.0 Elements

The following is an alphabetical list of all HTML 4.0 elements. An organizational list is also available.

u A - Anchor

u ABBR - Abbreviation

u ACRONYM - Acronym

u ADDRESS - Address

u APPLET - Java applet

u AREA - Image map region

u B - Bold text

u BASE - Document base URI

u BASEFONT - Base font change

u BDO - BiDi override

u BIG - Large text

u BLOCKQUOTE - Block quotation

u BODY - Document body

u BR - Line break

u BUTTON - Button

u CAPTION - Table caption

u CENTER - Centered block

u CITE - Citation

u CODE - Computer code

u COL - Table column

u COLGROUP - Table column group

u DD - Definition description

u DEL - Deleted text

u DFN - Defined term

u DIR - Directory list

u DIV - Generic block-level container

u DL - Definition list

u DT - Definition term

u EM - Emphasis

u FIELDSET - Form control group

u FONT - Font change

u FORM - Interactive form

u FRAME - Frame

u FRAMESET - Frameset

u H1 - Level-one heading

u H2 - Level-two heading

u H3 - Level-three heading

u H4 - Level-four heading

u H5 - Level-five heading

u H6 - Level-six heading

u HEAD - Document head

u HR - Horizontal rule

u HTML - HTML document

u I - Italic text

u IFRAME - Inline frame

u IMG - Inline image

u INPUT - Form input

u INS - Inserted text

u ISINDEX - Input prompt

u KBD - Text to be input

u LABEL - Form field label

u LEGEND - Fieldset caption

u LI - List item

u LINK - Document relationship

u MAP - Image map

u MENU - Menu list

u META - Metadata

u NOFRAMES - Frames alternate content

u NOSCRIPT - Alternate script content

u OBJECT - Object

u OL - Ordered list

u OPTGROUP - Option group

u OPTION - Menu option

u P - Paragraph

u PARAM - Object parameter

u PRE - Preformatted text

u Q - Short quotation

u S - Strike-through text

u SAMP - Sample output

u SCRIPT - Client-side script

u SELECT - Option selector

u SMALL - Small text

u SPAN - Generic inline container

u STRIKE - Strike-through text

u STRONG - Strong emphasis

u STYLE - Embedded style sheet

u SUB - Subscript

u SUP - Superscript

u TABLE - Table

u TBODY - Table body

u TD - Table data cell

u TEXTAREA - Multi-line text input

u TFOOT - Table foot

u TH - Table header cell

u THEAD - Table head

u TITLE - Document title

u TR - Table row

u TT - Teletype text

u U - Underlined text

u UL - Unordered list

u VAR - Variable

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


HTML 4.0 Entities

Entities

Character entity references, or entities for short, provide a method of entering characters that cannot be expressed in the document's character encoding or that cannot easily be entered on a keyboard. Entities are case-sensitive and take the form &name;. Examples of entities include &copy; for the copyright symbol and &Alpha; for the Greek capital letter alpha.

In addition to entities, authors can use numeric character references. While entities are limited to a subset of Unicode characters, numeric character references can specify any character. Numeric character references may be given in decimal or hexadecimal, though browser support is stronger for decimal references. Decimal references are of the form &#number; while hexadecimal references take the case-insensitive form &#xnumber;. Examples of numeric character references include &#169; or &#xA9; for the copyright symbol, &#913; or &#x391; for the Greek capital letter alpha, and &#1575; or &#x627; for the Arabic letter ALEF.

Note that hexadecimal character references will cause errors with current validators (except the WDG HTML Validator) since these references are defined in a recent revision to the SGML standard that is not yet supported by most validators.

The following documents feature tables of the character entity references in HTML 4.0, along with the numeric character reference in decimal and hexadecimal.

u Latin-1 Entities

u Symbols and Greek Letters

u Other Special Characters

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Latin-1 Characters ~ Symbols and Greek Letters ~ Other Special Characters

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


ABBR - Abbreviation

ABBR - Abbreviation

Syntax <ABBR>...</ABBR>
Attribute Specifications u common attributes
Contents Inline elements
Contained in Inline elements, block-level elements

The ABBR element is used to markup abbreviations. The TITLE attribute is useful in conjunction with ABBR to give the long form of the abbreviation, allowing visual browsers to provide the long form as a "tooltip". If the short form is a pronounceable word, the ACRONYM element should be used instead of ABBR.

Examples:

u <ABBR TITLE="United Nations">U.N.</ABBR>

u He weighs 180 <ABBR TITLE=pounds>lbs.</ABBR>

u <ABBR TITLE="Parti Québécois" LANG=fr-CA>PQ</ABBR>

u <ACRONYM TITLE="North Atlantic Treaty Organization">NATO</ACRONYM>

Some short forms, such as "SQL" and "URL," are pronounced as words by some but pronounced letter-by-letter by others. In such cases, the ABBR element should be favored over ACRONYM. A style sheet could be used to suggest the aural rendering. For example, one could use

<ABBR TITLE="Uniform Resource Locator">URL</ABBR>

with the following CSS2 style sheet:

abbr[title="Uniform Resource Locator"] { speak: spell-out }

More Information

u ABBR in W3C HTML 4.0 Recommendation

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


ACRONYM - Acronym

ACRONYM - Acronym

Syntax <ACRONYM>...</ACRONYM>
Attribute Specifications u common attributes
Contents Inline elements
Contained in Inline elements, block-level elements

The ACRONYM element is used to markup acronyms. The TITLE attribute is useful in conjunction with ACRONYM to give the long form of the acronym, allowing visual browsers to provide the long form as a "tooltip". Examples:

u <ACRONYM TITLE="North Atlantic Treaty Organization">NATO</ACRONYM>

u <ACRONYM TITLE="radio detecting and ranging">radar</ACRONYM>

u <ABBR TITLE="Federal Bureau of Investigation">FBI</ABBR>

Unlike other kinds of abbreviations, acronyms are pronounceable words, though in some cases the pronunciation is strictly a presentation issue. For example, "SQL" and "URL" are pronounced as words by some people and pronounced letter-by-letter by others. In such cases, authors should use the ABBR element, possibly with a style sheet rule specifying the pronunciation for aural rendering.

More Information

u ACRONYM in W3C HTML 4.0 Recommendation

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


BDO - BiDi Override

BDO - BiDi Override

Syntax <BDO>...</BDO>
Attribute Specifications u DIR=[ ltr | rtl ] (directionality of text)  u LANG=LanguageCode (language of text)  u core attributes
Contents Inline elements
Contained in Inline elements, block-level elements

The BDO element overrides the bidirectional algorithm for the enclosed text. Characters in Unicode are assigned a directionality, left-to-right or right-to-left, to allow the text to be rendered properly. For example, while English characters are presented left-to-right, Hebrew characters are presented right-to-left.

Unicode defines a bidirectional algorithm that must be applied whenever a document contains right-to-left characters. While this algorithm usually gives the proper presentation, occasionally authors must override the bidirectional algorithm and specify the directionality of the text. One such case is when Hebrew characters are stored in visual order, where the first character of a word is after the second character. Unicode assumes that the characters are stored in logical order, where the first character of a word is before the second character, so the bidirectional algorithm would result in a rendering with the first character incorrectly to the left of the second character.

The BDO element requires the DIR attribute to specify the directionality of the enclosed text. If a document contains Hebrew characters stored in visual order, one should use <BDO DIR=ltr>text</BDO> to force the proper presentation for that text.

Authors may alternatively override the bidirectional algorithm using the Unicode character &#x202D; to force left-to-right directionality or &#x202E; to force right-to-left directionality. The character &#x202C; ends the overriding of the algorithm. These characters should not be used in combination with the DIR attribute.

More Information

u BDO in W3C HTML 4.0 Recommendation

u Introduction to the bidirectional algorithm

u Unicode

u Middle Eastern Language Issues

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


BUTTON - Button

BUTTON - Button

Syntax <BUTTON>...</BUTTON>
Attribute Specifications u NAME=CDATA (key in submitted form)  u VALUE=CDATA (value in submitted form)  u TYPE=[ submit | reset | button ] (type of button)  u DISABLED (disable button)  u ACCESSKEY=Character (shortcut key)  u TABINDEX=Number (position in tabbing order)  u ONFOCUS=Script (element received focus)  u ONBLUR=Script (element lost focus)  u common attributes
Contents u Inline elements except A, INPUT, SELECT, TEXTAREA, LABEL, BUTTON, and IFRAME  u Block-level elements except FORM, ISINDEX, and FIELDSET
Contained in Block-level elements, inline elements except BUTTON

The BUTTON element defines a submit button, reset button, or push button. Authors can also use INPUT to specify these buttons, but the BUTTON element allows richer labels, including images and emphasis. However, BUTTON is new in HTML 4.0 and poorly supported among current browsers, so INPUT is a more reliable choice at this time.

The TYPE attribute of BUTTON specifies the kind of button and takes the value submit (the default), reset, or button. The NAME and VALUE attributes determine the name/value pair sent to the server when a submit button is pushed. These attributes allow authors to provide multiple submit buttons and have the form handler take a different action depending on the submit button used.

Some examples of BUTTON follow:

u <BUTTON NAME=submit VALUE=modify ACCESSKEY=M>Modify information</BUTTON>
<BUTTON NAME=submit VALUE=continue ACCESSKEY=C>Continue with application</BUTTON>

u <BUTTON ACCESSKEY=S>Submit <IMG SRC="checkmark.gif" ALT="&#10004;"></BUTTON>
<BUTTON TYPE=reset ACCESSKEY=R>Reset <IMG SRC="x.gif" ALT="&#10008;"></BUTTON>

u <BUTTON TYPE=button ID=toggler ONCLICK="toggle()" ACCESSKEY=H>Hide <strong>non-strict</strong> attributes</BUTTON>

The ACCESSKEY attribute, used throughout the preceding examples, specifies a single Unicode character as a shortcut key for pressing the button. Entities (e.g. &eacute;) may be used as the ACCESSKEY value.

The boolean DISABLED attribute makes the BUTTON element unavailable. The user is unable to push the button, the button cannot receive focus, and the button is skipped when navigating the document by tabbing.

The TABINDEX attribute specifies a number between 0 and 32767 to indicate the tabbing order of the button. A BUTTON element with TABINDEX=0 or no TABINDEX attribute will be visited after any elements with a positive TABINDEX. Among positive TABINDEX values, the lower number receives focus first. In the case of a tie, the element appearing first in the HTML document takes precedence.

The BUTTON element also takes a number of attributes to specify client-side scripting actions for various events. In addition to the core events common to most elements, BUTTON accepts the following event attributes:

u ONFOCUS, when the element receives focus;

u ONBLUR, when the element loses focus.

More Information

u BUTTON in W3C HTML 4.0 Recommendation

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


COL - Table Column

COL - Table Column

Syntax <COL>
Attribute Specifications u SPAN=Number (number of columns)  u WIDTH=MultiLength (width of each column)  u ALIGN=[ left | center | right | justify | char ] (horizontal alignment of cells)  u CHAR=Character (alignment character for cells)  u CHAROFF=Length (alignment character offset)  u VALIGN=[ top | middle | bottom | baseline ] (vertical alignment of cells)  u common attributes
Contents Empty
Contained in COLGROUP, TABLE

The COL element defines attributes common to a table column. If used, COL must be after the optional CAPTION and before the optional THEAD in the TABLE. Unlike COLGROUP, COL does not group columns structurally; it merely defines attributes common to all cells in one or more columns.

COL's SPAN attribute defines the number of columns that will share the COL element's other attributes; the default value is 1. COL may be contained directly in the TABLE element or it may be contained within a COLGROUP. If COL is in a COLGROUP, the COL's attributes override those of the COLGROUP for the columns spanned by COL.

The next example uses COL elements within COLGROUPs to assign a different CLASS to each column:

<TABLE SUMMARY="This table gives the character entity reference,
                decimal character reference, and hexadecimal character
                reference for 8-bit Latin-1 characters, as well as the
                rendering of each in your browser.">
  <COLGROUP CLASS="character-description">
  <COLGROUP>
    <COL CLASS=entity>
    <COL SPAN=2 CLASS=numeric>
  <COLGROUP>
    <COL CLASS="entity-rendering">
    <COL CLASS="decimal-rendering">
    <COL CLASS="hex-rendering">
  <THEAD>
    <TR>
      <TH SCOPE=col ROWSPAN=2>Character</TH>
      <TH SCOPE=col ROWSPAN=2>Entity</TH>
      <TH SCOPE=col ROWSPAN=2>Decimal</TH>
      <TH SCOPE=col ROWSPAN=2>Hex</TH>
      <TH SCOPE=colgroup COLSPAN=3>Rendering in Your Browser</TH>
    </TR>
    <TR>
      <TH SCOPE=col>Entity</TH>
      <TH SCOPE=col>Decimal</TH>
      <TH SCOPE=col>Hex</TH>
    </TR>
  </THEAD>
  <TBODY>
    <TR>
      <TD SCOPE=row>non-breaking space</TD>
      <TD>&amp;nbsp;</TD>
      <TD>&amp;#160;</TD>
      <TD>&amp;#xA0;</TD>
      <TD>&nbsp;</TD>
      <TD>&#160;</TD>
      <TD>&#xA0;</TD>
    </TR>
    ...
  </TBODY>
</TABLE>

COL also takes a number of presentational attributes, many of which cannot be completely replaced by style sheets. Since few browsers support COL, authors may wish to specify these attributes on the TD or TH elements instead.

The WIDTH attribute specifies a width for each column spanned by COL. The value must be a number in pixels, a percentage of the table width, or a relative length expressed as i* where i is an integer. A column with WIDTH="3*" will be allotted three times the width of a column with WIDTH="1*". The value 0* is equivalent to the minimum width necessary for the column's contents.

The ALIGN attribute specifies the horizontal alignment for each cell in the spanned columns. Possible values are left, center, right, justify, and char. ALIGN=char aligns a cell's contents on the character given in the CHAR attribute. The default value for the CHAR attribute is the decimal point of the current language--a period in English. The CHAROFF attribute specifies the offset to the first occurrence of the alignment character. The attribute's value is a number in pixels or a percentage of the cell's width; CHAROFF="50%" centers the alignment character horizontally in a cell.

The VALIGN attribute specifies the vertical position of a cell's contents. Possible values are:

u top, which positions data at the top of the cell;

u middle, the default value, which centers the cell data vertically;

u bottom, which positions data at the bottom of the cell;

u baseline, which specifies that the first line of each cell in the row with ALIGN=baseline should occur on a common baseline.

More Information

u COL in W3C HTML 4.0 Recommendation

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


COLGROUP - Table Column Group

COLGROUP - Table Column Group

Syntax <COLGROUP>...</COLGROUP>
Attribute Specifications u SPAN=Number (number of columns in group)  u WIDTH=MultiLength (width of each column)  u ALIGN=[ left | center | right | justify | char ] (horizontal alignment of cells in group)  u CHAR=Character (alignment character for cells)  u CHAROFF=Length (alignment character offset)  u VALIGN=[ top | middle | bottom | baseline ] (vertical alignment of cells in group)  u common attributes
Contents Zero or more COL elements
Contained in TABLE

The COLGROUP element defines a column group in a table. If used, COLGROUP must be after the optional CAPTION and before the optional THEAD in the TABLE. The structural divisions defined by COLGROUP allow authors to easily suggest a presentation for groups of columns through style sheets.

COLGROUP's SPAN attribute defines the number of columns in the group; the default value is 1. A number of other attributes are permitted on COLGROUP, and these are shared among the cells of the group. COLGROUP may contain COL elements that define attributes for the cells of individual columns, overriding attributes defined for the column group. The SPAN attribute should not be used if the COLGROUP contains any COL elements.

The next example features three column groups to structurally divide the table into three parts. The first part is a single column that gives the description of a character. The second part consists of three columns giving different ways of representing the character in HTML. The third part consists of three columns with renderings of the character in the user's browser.

<TABLE SUMMARY="This table gives the character entity reference,
                decimal character reference, and hexadecimal character
                reference for 8-bit Latin-1 characters, as well as the
                rendering of each in your browser.">
  <COLGROUP>
  <COLGROUP SPAN=3>
  <COLGROUP SPAN=3>
  <THEAD>
    <TR>
      <TH SCOPE=col ROWSPAN=2>Character</TH>
      <TH SCOPE=col ROWSPAN=2>Entity</TH>
      <TH SCOPE=col ROWSPAN=2>Decimal</TH>
      <TH SCOPE=col ROWSPAN=2>Hex</TH>
      <TH SCOPE=colgroup COLSPAN=3>Rendering in Your Browser</TH>
    </TR>
    <TR>
      <TH SCOPE=col>Entity</TH>
      <TH SCOPE=col>Decimal</TH>
      <TH SCOPE=col>Hex</TH>
    </TR>
  </THEAD>
  <TBODY>
    <TR>
      <TD SCOPE=row>non-breaking space</TD>
      <TD>&amp;nbsp;</TD>
      <TD>&amp;#160;</TD>
      <TD>&amp;#xA0;</TD>
      <TD>&nbsp;</TD>
      <TD>&#160;</TD>
      <TD>&#xA0;</TD>
    </TR>
    ...
  </TBODY>
</TABLE>

In place of the <COLGROUP SPAN=3> tag in the preceding example, a COLGROUP with three COL elements could have been used:

<COLGROUP>
  <COL CLASS=entity>
  <COL CLASS=decimal>
  <COL CLASS=hex>
</COLGROUP>

Here we have used the CLASS attribute to distinguish the individual columns of the group, allowing us to easily suggest different presentations for the columns through style sheets.

COLGROUP also takes a number of presentational attributes, many of which cannot be completely replaced by style sheets. Since few browsers support COLGROUP, authors may wish to specify these attributes on the TD or TH elements instead.

The WIDTH attribute specifies a width for each column in the group. The value must be a number in pixels, a percentage of the table width, or a relative length expressed as i* where i is an integer. A column with WIDTH="3*" will be allotted three times the width of a column with WIDTH="1*". The value 0* is equivalent to the minimum width necessary for the column's contents.

The ALIGN attribute specifies the horizontal alignment for each cell in the column group. Possible values are left, center, right, justify, and char. ALIGN=char aligns a cell's contents on the character given in the CHAR attribute. The default value for the CHAR attribute is the decimal point of the current language--a period in English. The CHAROFF attribute specifies the offset to the first occurrence of the alignment character. The attribute's value is a number in pixels or a percentage of the cell's width; CHAROFF="50%" centers the alignment character horizontally in a cell.

The VALIGN attribute specifies the vertical position of a cell's contents. Possible values are:

u top, which positions data at the top of the cell;

u middle, the default value, which centers the cell data vertically;

u bottom, which positions data at the bottom of the cell;

u baseline, which specifies that the first line of each cell in the row with ALIGN=baseline should occur on a common baseline.

More Information

u COLGROUP in W3C HTML 4.0 Recommendation

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


DEL - Deleted Text

DEL - Deleted Text

Syntax <DEL>...</DEL>
Attribute Specifications u CITE=URI (reason for deletion)  u DATETIME=Datetime (date and time of deletion)  u common attributes
Contents Inline elements, block-level elements
Contained in Inline elements, block-level elements

The DEL element contains content that has been deleted. This element is useful in marking changes from one version of a document to the next. Through style sheets, authors can suggest an appropriate rendering, such as not displaying the deleted content or rendering the text with a strike-through style.

DEL may be used as either a block-level element or an inline element. If used as an inline element (e.g., within a P), then DEL may not contain any block-level elements.

The optional CITE attribute of DEL gives a URI with information on why the content was deleted. A brief explanation for the deletion can be given with the TITLE attribute, which may be rendered as a "tooltip" by some browsers.

The optional DATETIME attribute specifies the date and time of the deletion. The value is case-sensitive and of the form YYYY-MM-DDThh:mm:ssTZD. See the values section for a full explanation of this format.

An example follows:

<DEL CITE="http://www.w3.org/TR/REC-html40/appendix/changes.html#h-A.1.3" DATETIME="1997-12-19T00:00:00-05:00" TITLE="XMP is obsolete"><P>The XMP element contains preformatted text in which markup other than an end tag is treated as literal text.</P></DEL>

Since DEL is poorly supported among browsers, authors may wish to use a font style element such as STRIKE (deprecated in HTML 4.0) to attempt to convey the meaning of DEL to non-supporting visual browsers. The previous example could also be marked up as follows:

<DEL CITE="http://www.w3.org/TR/REC-html40/appendix/changes.html#h-A.1.3" DATETIME="1997-12-19T00:00:00-05:00" TITLE="XMP is obsolete"><P><STRIKE>The XMP element is used for preformatted text in which markup other than an end tag is treated as literal text.</STRIKE></P></DEL>

More Information

u DEL in W3C HTML 4.0 Recommendation

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


FIELDSET - Form Control Group

FIELDSET - Form Control Group

Syntax <FIELDSET>...</FIELDSET>
Attribute Specifications u common attributes
Contents A LEGEND element followed by zero or more block-level elements and inline elements
Contained in APPLET, BLOCKQUOTE, BODY, CENTER, DD, DEL, DIV, FIELDSET, FORM, IFRAME, INS, LI, MAP, NOFRAMES, NOSCRIPT, OBJECT, TD, TH

The FIELDSET element defines a form control group. By grouping related form controls, authors can divide a form into smaller, more manageable parts, improving the usability disaster that can strike when confronting users with too many form controls. The grouping provided by FIELDSET also helps the accessibility of forms to those using aural browsers by allowing these users to more easily orient themselves when filling in a large form.

While FIELDSET is not widely supported by current browsers, it can be used safely by explicitly closing any preceding P element with </P> or by including an empty P prior to the FIELDSET. This causes non-supporting browsers to infer the start of a block-level element even though they ignore the block-level FIELDSET element.

The content of a FIELDSET element must begin with a LEGEND to provide a caption for the group of controls. Following the LEGEND, FIELDSET may contain any inline or block-level element, including another FIELDSET.

An example follows:

<FORM METHOD=post ACTION="/cgi-bin/order.cgi">

  <FIELDSET>
    <LEGEND ACCESSKEY=I>Contact Information</LEGEND>
    <TABLE>
      <TR>
        <TD>
          <LABEL FOR=name ACCESSKEY=N>Name:</LABEL>
        </TD>
        <TD>
          <INPUT TYPE=text NAME=name ID=name>
        </TD>
      </TR>
      <TR>
        <TD>
          <LABEL FOR=email ACCESSKEY=E>E-mail Address:</LABEL>
        </TD>
        <TD>
          <INPUT TYPE=text NAME=email ID=email>
        </TD>
      </TR>
      <TR>
        <TD>
          <LABEL FOR=addr ACCESSKEY=A>Mailing Address:</LABEL>
        </TD>
        <TD>
          <TEXTAREA NAME=address ID=addr ROWS=4 COLS=40></TEXTAREA>
        </TD>
      </TR>
    </TABLE>
  </FIELDSET>

  <FIELDSET>
    <LEGEND ACCESSKEY=O>Ordering Information</LEGEND>
    <P>Please select the product(s) that you wish to order:</P>
    <P>
      <LABEL ACCESSKEY=3>
        <INPUT TYPE=checkbox NAME=products VALUE="HTML 3.2 Reference">
        <A href="http://www.htmlhelp.com/reference/wilbur/">HTML 3.2 Reference</A>
      </LABEL>
      <BR>
      <LABEL ACCESSKEY=4>
        <INPUT TYPE=checkbox NAME=products VALUE="HTML 4.0 Reference">
        <A href="http://www.htmlhelp.com/reference/html40/">HTML 4.0 Reference</A>
      </LABEL>
      <BR>
      <LABEL ACCESSKEY=S>
        <INPUT TYPE=checkbox NAME=products VALUE="CSS Guide">
        <A href="http://www.htmlhelp.com/reference/css/">Cascading Style Sheets Guide</A>
      </LABEL>
    </P>
  </FIELDSET>

  <FIELDSET>
    <LEGEND ACCESSKEY=C>Credit Card Information</LEGEND>
    <P>
      <LABEL ACCESSKEY=V>
        <INPUT TYPE=radio NAME=card VALUE=visa> Visa
      </LABEL>
      <LABEL ACCESSKEY=M>
        <INPUT TYPE=radio NAME=card VALUE=mc> MasterCard
      </LABEL>
      <BR>
      <LABEL ACCESSKEY=u>
        Number: <INPUT TYPE=text NAME=number>
      </LABEL>
      <BR>
      <LABEL ACCESSKEY=E>
        Expiry: <INPUT TYPE=text NAME=expiry>
      </LABEL>
    </P>
  </FIELDSET>

  <P>
    <INPUT TYPE=submit VALUE="Submit order">
    <INPUT TYPE=reset VALUE="Clear order form">
  </P>

</FORM>

More Information

u FIELDSET in W3C HTML 4.0 Recommendation

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


FRAME - Frame

FRAME - Frame

Syntax <FRAME>
Attribute Specifications u NAME=CDATA (name of frame)  u SRC=URI (content of frame)  u LONGDESC=URI (long description of frame)  u FRAMEBORDER=[ 1 | 0 ] (frame border)  u MARGINWIDTH=Pixels (margin width)  u MARGINHEIGHT=Pixels (margin height)  u NORESIZE (disallow frame resizing)  u SCROLLING=[ yes | no | auto ] (ability to scroll)  u core attributes
Contents Empty
Contained in FRAMESET

The FRAME element defines a frame--a rectangular subspace within a Frameset document. Each FRAME must be contained within a FRAMESET that defines the dimensions of the frame.

The SRC attribute provides the URI of the frame's content, which is typically an HTML document. If the frame's content is an image, video, or similar object, and if the object cannot be described adequately using the TITLE attribute of FRAME, then authors should use the LONGDESC attribute to provide the URI of a full HTML description of the object.

For better accessibility to disabled users and better indexing with search engines, authors should not use an image or similar object as the content of a frame. Rather, the object should be embedded within an HTML document to allow the indexing of keywords and easier provision of alternate content.

The NAME attribute gives a name to the frame for use with the TARGET attribute of the A, AREA, BASE, FORM, and LINK elements. The NAME attribute value must begin with a character in the range A-Z or a-z.

The NAME should be human-readable and based on the content of the frame since non-windows browsers may use the NAME as a title for presenting a list of frames to the user. For example, NAME=left would be inappropriate since it says nothing about the content while NAME=nav would be inappropriate since it is not very human-readable. More suitable would be NAME=Content and NAME=Navigation. The TITLE attribute can also be used to provide a slightly longer title for the frame, though this is not widely supported by current browsers.

An example follows:

<FRAMESET ROWS="*,100">
  <FRAMESET COLS="40%,*">
    <FRAME NAME="Menu" SRC="nav.html" TITLE="Menu">
    <FRAME NAME="Content" SRC="main.html" TITLE="Content">
  </FRAMESET>
  <FRAME NAME="Ad" SRC="ad.html" TITLE="Advertisement">
  <NOFRAMES>
    <BODY>
      <H1>Table of Contents</H1>
      <UL>
        <LI>
          <A HREF="reference/html40/">HTML 4.0 Reference</A>
        </LI>
        <LI>
          <A HREF="reference/wilbur/">HTML 3.2 Reference</A>
        </LI>
        <LI>
          <A HREF="reference/css/">CSS Guide</A>
        </LI>
      </UL>
      <P>
        <IMG SRC="ad.gif" ALT="Ad: Does your bank charge too much?">
      </P>
    </BODY>
  </NOFRAMES>
</FRAMESET>

The FRAME element also accepts a number of attributes to specify the presentation on visual browsers. Style sheets provide a more flexible method of defining the presentation of frames, but the element's presentational attributes are more widely supported.

The FRAMEBORDER attribute specifies whether or not the frame has a visible border. The default value, 1, tells the browser to draw a border between the frame and all adjoining frames. The value 0 indicates that no border should be drawn, though borders from other frames will override this.

To fully remove the border, some browsers also require the use of other, non-standard attributes. See How do I remove the border around frames? for more details.

Note that removing the border of a frame takes away the user's ability to resize the frame on most browsers.

The MARGINWIDTH and MARGINHEIGHT attributes define the number of pixels to use as the left/right margins and top/bottom margins, respectively, within the frame. The value must be greater than one pixel.

The boolean NORESIZE attribute prevents the user from resizing the frame. This attribute should never be used in a user-friendly Web site.

The SCROLLING attribute specifies whether scrollbars are provided for the frame. The default value, auto, generates scrollbars only when necessary. The value yes gives scrollbars at all times, and the value no suppresses scrollbars--even when they are needed to see all the content. The value no should never be used.

More Information

u FRAME in W3C HTML 4.0 Recommendation

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


FRAMESET - Frameset

FRAMESET - Frameset

Syntax <FRAMESET>...</FRAMESET>
Attribute Specifications u ROWS=MultiLengths (row lengths)  u COLS=MultiLengths (column lengths)  u ONLOAD=Script (all frames have been loaded)  u ONUNLOAD=Script (all frames have been removed)  u core attributes
Contents One or more FRAMESET and FRAME elements, as well as an optional NOFRAMES
Contained in HTML

The FRAMESET element is a frame container for dividing a window into rectangular subspaces called frames. In a Frameset document, the outermost FRAMESET element takes the place of BODY and immediately follows the HEAD.

The FRAMESET element contains one or more FRAMESET or FRAME elements, along with an optional NOFRAMES element to provide alternate content for browsers that do not support frames or have frames disabled. A meaningful NOFRAMES element should always be provided and should at the very least contain links to the main frame or frames.

The ROWS and COLS attributes define the dimensions of each frame in the set. Each attribute takes a comma-separated list of lengths, specified in pixels, as a percentage, or as a relative length. A relative length is expressed as i* where i is an integer. For example, a frameset defined with ROWS="3*,*" (* is equivalent to 1*) will have its first row allotted three times the height of the second row.

The values specified for the ROWS attribute give the height of each row, from top to bottom. The COLS attribute gives the width of each column from left to right. If ROWS or COLS is omitted, the implied value for the attribute is 100%. If both attributes are specified, a grid is defined and filled left-to-right then top-to-bottom.

The following example sets up a grid with two rows and three columns:

<FRAMESET ROWS="70%,30%" COLS="33%,33%,34%">
  <FRAME NAME="Photo1" SRC="Row1_Column1.html">
  <FRAME NAME="Photo2" SRC="Row1_Column2.html">
  <FRAME NAME="Photo3" SRC="Row1_Column3.html">
  <FRAME NAME="Caption1" SRC="Row2_Column1.html">
  <FRAME NAME="Caption2" SRC="Row2_Column2.html">
  <FRAME NAME="Caption3" SRC="Row2_Column3.html">
  <NOFRAMES>
    <BODY>
      <H1>Table of Contents</H1>
        <UL>
          <LI>
            <A HREF="Row1_Column1.html">Photo 1</A>
            (<A HREF="Row2_Column1.html">Caption</A>)
          </LI>
          <LI>
            <A HREF="Row1_Column2.html">Photo 2</A>
            (<A HREF="Row2_Column2.html">Caption</A>)
          </LI>
          <LI>
            <A HREF="Row1_Column3.html">Photo 3</A>
            (<A HREF="Row2_Column3.html">Caption</A>)
          </LI>
      </UL>
    </BODY>
  </NOFRAMES>
</FRAMESET>

The next example features nested FRAMESET elements to define two frames in the first row and one frame in the second row:

<FRAMESET ROWS="*,100">
  <FRAMESET COLS="40%,*">
    <FRAME NAME="Menu" SRC="nav.html" TITLE="Menu">
    <FRAME NAME="Content" SRC="main.html" TITLE="Content">
  </FRAMESET>
  <FRAME NAME="Ad" SRC="ad.html" TITLE="Advertisement">
  <NOFRAMES>
    <BODY>
      <H1>Table of Contents</H1>
      <UL>
        <LI>
          <A HREF="reference/html40/">HTML 4.0 Reference</A>
        </LI>
        <LI>
          <A HREF="reference/wilbur/">HTML 3.2 Reference</A>
        </LI>
        <LI>
          <A HREF="reference/css/">CSS Guide</A>
        </LI>
      </UL>
      <P>
        <IMG SRC="ad.gif" ALT="Ad: Does your bank charge too much?">
      </P>
    </BODY>
  </NOFRAMES>
</FRAMESET>

When pixel lengths are used, they should always be combined with a relative length to handle various window sizes. Pixel lengths should only be used when the frame consists primarily of images or other objects with a fixed size in pixels. Due to their ability to adapt to different window sizes, percentages and relative lengths are generally preferred.

The FRAMESET element also accepts ONLOAD and ONUNLOAD attributes to specify client-side scripting actions to perform when the frames have all been loaded or removed.

More Information

u FRAMESET in W3C HTML 4.0 Recommendation

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


IFRAME - Inline Frame

IFRAME - Inline Frame

Syntax <IFRAME>...</IFRAME>
Attribute Specifications u SRC=URI (URI of frame content)  u NAME=CDATA (name of frame)  u LONGDESC=URI (link to long description)  u WIDTH=Length (frame width)  u HEIGHT=Length (frame height)  u ALIGN=[ top | middle | bottom | left | right ] (frame alignment)  u FRAMEBORDER=[ 1 | 0 ] (frame border)  u MARGINWIDTH=Pixels (margin width)  u MARGINHEIGHT=Pixels (margin height)  u SCROLLING=[ yes | no | auto ] (ability to scroll)  u core attributes
Contents Inline elements, block-level elements
Contained in Inline elements, block-level elements

The IFRAME element defines an inline frame for the inclusion of external objects including other HTML documents. IFRAME provides a subset of the functionality of OBJECT; the only advantage to IFRAME is that an inline frame can act as a target for other links. OBJECT is more widely supported than IFRAME, and, unlike IFRAME, OBJECT is included in HTML 4.0 Strict.

IFRAME's SRC attribute provides the location of the frame content--typically an HTML document. The optional NAME attribute specifies the name of the inline frame, allowing links to target the frame.

The content of the IFRAME element is used as an alternative for browsers that are not configured to show or do not support inline frames. The content may consist of inline or block-level elements, though any block-level elements must be allowed inside the containing element of IFRAME. For example, an IFRAME within an H1 cannot contain an H2, but an IFRAME within a DIV can contain any block-level elements.

The LONGDESC attribute gives the URI of a long description of the frame's contents. This is particularly useful for full descriptions of embedded objects. Note that LONGDESC describes the frame content while the content of the IFRAME element acts as a replacement when the external resource cannot be inlined.

An example follows:

<IFRAME SRC="recipe.html" TITLE="The Famous Recipe">
<!-- Alternate content for non-supporting browsers -->
<H2>The Famous Recipe</H2>
<H3>Ingredients</H3>
...
</IFRAME>

The WIDTH and HEIGHT attributes specify the dimensions of the inline frame in pixels or as a percentage of the available space. The FRAMEBORDER attribute specifies whether or not a border should be drawn. The default value of 1 results in a border while a value of 0 suppresses the border. Style sheets allow greater flexibility in suggesting the border presentation.

The ALIGN attribute specifies the alignment of the inline frame. The values top, middle, and bottom specify the frame's position with respect to surrounding content on its left and right.

ALIGN=middle aligns the center of the frame with the current baseline. To center the frame horizontally on the page, place the frame in a centered block, e.g.,

<P ALIGN=center><IFRAME SRC="foo.html" WIDTH=300 HEIGHT=100></IFRAME></P>

The other ALIGN values, left and right, specify a floating frame; the frame is placed at the left or right margin and content flows around it. To place content below the frame, use <BR CLEAR=left|right|all> as appropriate.

The vertical-align and float properties of Cascading Style Sheets provide more flexible methods of aligning inline frames.

The MARGINWIDTH and MARGINHEIGHT attributes define the number of pixels to use as the left/right margins and top/bottom margins, respectively, within the inline frame. The value must be greater than one pixel.

The SCROLLING attribute specifies whether scrollbars are provided for the inline frame. The default value, auto, generates scrollbars only when necessary. The value yes gives scrollbars at all times, and the value no suppresses scrollbars--even when they are needed to see all the content. The value no should never be used.

More Information

u IFRAME in W3C HTML 4.0 Recommendation

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


INS - Inserted Text

INS - Inserted Text

Syntax <INS>...</INS>
Attribute Specifications u CITE=URI (reason for insertion)  u DATETIME=Datetime (date and time of insertion)  u common attributes
Contents Inline elements, block-level elements
Contained in Inline elements, block-level elements

The INS element contains content that has been inserted. This element is useful in marking changes from one version of a document to the next. Through style sheets, authors can suggest an appropriate rendering, such as rendering the inserted content in italics, a different color, or a different voice.

INS may be used as either a block-level element or an inline element. If used as an inline element (e.g., within a P), then INS may not contain any block-level elements.

The optional CITE attribute of INS gives a URI with information on why the content was inserted. A brief explanation for the insertion can be given with the TITLE attribute, which may be rendered as a "tooltip" by some browsers.

The optional DATETIME attribute specifies the date and time of the insertion. The value is case-sensitive and of the form YYYY-MM-DDThh:mm:ssTZD. See the values section for a full explanation of this format.

An example follows:

<P>The CENTER element defines a block whose contents are centered horizontally on visual browsers. <INS CITE="http://www.w3.org/TR/REC-html40/appendix/changes.html#h-A.1.2" DATETIME="1997-12-19T00:00:00-05:00">Note that CENTER is deprecated in HTML 4.0.</INS></P>

More Information

u INS in W3C HTML 4.0 Recommendation

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


LABEL - Form Field Label

LABEL - Form Field Label

Syntax <LABEL>...</LABEL>
Attribute Specifications u FOR=IDREF (associated form field)  u ACCESSKEY=Character (shortcut key)  u ONFOCUS=Script (element received focus)  u ONBLUR=Script (element lost focus)  u common attributes
Contents Inline elements except LABEL
Contained in Block-level elements, inline elements except BUTTON

The LABEL element associates a label with a form control. By associating labels with form controls, authors give important hints to users of speech browsers while also allowing visual browsers to duplicate common GUI features (e.g., the ability to click on a text label to select a radio button or checkbox).

Each LABEL element is associated with exactly one form control. The element's content is the label of the form control and may include inline elements such as IMG and STRONG.

The FOR attribute explicitly specifies the control associated with the LABEL. The value of the FOR attribute must match the value of the associated form control's ID attribute. In the absence of the FOR attribute, the LABEL must contain the associated form control. This method of implicit association is convenient in many cases, but not an option when the form control and its label are in different table cells, paragraphs, or divisions. The following example illustrates both explicit and implicit label associations:

<TABLE>
  <TR>
    <TD>
      <LABEL FOR=user ACCESSKEY=U>User</LABEL>
    </TD>
    <TD>
      <SELECT NAME=user ID=user>
        <OPTION>Jean</OPTION>
        <OPTION>Kim</OPTION>
        <OPTION>Brian</OPTION>
      </SELECT>
    </TD>
  </TR>
  <TR>
    <TD><LABEL FOR=passwd ACCESSKEY=P>Password</LABEL></TD>
    <TD><INPUT TYPE=password NAME=password ID=passwd></TD>
  </TR>
</TABLE>
<P>
  <LABEL ACCESSKEY=S>
    <INPUT TYPE=checkbox NAME=save VALUE=yes>
    Save user name and password in a cookie
  </LABEL>
</P>
<P>
  <LABEL ACCESSKEY=C>
    Comments to post:
    <TEXTAREA NAME=comments ROWS=8 COLS=50></TEXTAREA>
  </LABEL>
</P>

The ACCESSKEY attribute, used throughout the preceding example, specifies a single Unicode character as a shortcut key for giving focus to the LABEL, which passes the focus on to the associated form control. Entities (e.g. &eacute;) may be used as the ACCESSKEY value.

The LABEL element also takes a number of attributes to specify client-side scripting actions for various events. In addition to the core events common to most elements, LABEL accepts the following event attributes:

u ONFOCUS, when the element receives focus;

u ONBLUR, when the element loses focus.

More Information

u LABEL in W3C HTML 4.0 Recommendation

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


LEGEND - Fieldset Caption

LEGEND - Fieldset Caption

Syntax <LEGEND>...</LEGEND>
Attribute Specifications u ACCESSKEY=Character (shortcut key)  u ALIGN=[ top | bottom | left | right ] (alignment relative to fieldset)  u common attributes
Contents Inline elements
Contained in FIELDSET

The LEGEND element defines a caption for form controls grouped by the FIELDSET element. The LEGEND element must be at the start of a FIELDSET, before any other elements.

While the LEGEND element is not widely supported by current browsers, it can still be used safely if a block-level element immediately follows the LEGEND. Combined with careful use of FIELDSET, this will cause non-supporting browsers to render the caption as its own paragraph. Elements such as STRONG, B, and BIG could also be used to help express the meaning of LEGEND to non-supporting browsers.

An example follows:

<FIELDSET>
  <LEGEND ACCESSKEY=C>Credit Card Information</LEGEND>
  <P>
    <LABEL ACCESSKEY=V>
      <INPUT TYPE=radio NAME=card VALUE=visa> Visa
    </LABEL>
    <LABEL ACCESSKEY=M>
      <INPUT TYPE=radio NAME=card VALUE=mc> MasterCard
    </LABEL>
    <BR>
    <LABEL ACCESSKEY=N>
      Number: <INPUT TYPE=text NAME=number>
    </LABEL>
    <BR>
    <LABEL ACCESSKEY=E>
      Expiry: <INPUT TYPE=text NAME=expiry>
    </LABEL>
  </P>
</FIELDSET>

LEGEND's ACCESSKEY attribute, used throughout the preceding example, specifies a single Unicode character as a shortcut key for giving focus to the LEGEND, allowing the user to quickly jump to a group of form controls. Entities (e.g. &eacute;) may be used as the ACCESSKEY value.

The deprecated ALIGN attribute of LEGEND suggests where the caption should be positioned relative to the FIELDSET on visual browsers. Possible values are top, bottom, left, and right. While ALIGN is deprecated, no alternative currently exists in Cascading Style Sheets.

More Information

u LEGEND in W3C HTML 4.0 Recommendation

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


NOFRAMES - Frames Alternate Content

NOFRAMES - Frames Alternate Content

Syntax <NOFRAMES>...</NOFRAMES>
Attribute Specifications u common attributes
Contents u In HTML 4.0 Transitional: inline elements, block-level elements  u In HTML 4.0 Frameset: one BODY element that must not contain any NOFRAMES elements
Contained in APPLET, BLOCKQUOTE, BODY, BUTTON, CENTER, DD, DEL, DIV, FIELDSET, FORM, FRAMESET, IFRAME, INS, LI, MAP, NOSCRIPT, OBJECT, TD, TH

The NOFRAMES element contains content that should only be rendered when frames are not displayed. NOFRAMES is typically used in a Frameset document to provide alternate content for browsers that do not support frames or have frames disabled.

When used within a FRAMESET, NOFRAMES must contain a BODY element. There must not be any NOFRAMES elements contained within this BODY element.

A meaningful NOFRAMES element should always be provided in a Frameset document and should at the very least contain links to the main frame or frames. NOFRAMES should not contain a message telling the user to upgrade his or her browser. Some browsers support frames but allow the user to disable them.

Various methods of automatically creating non-frames content exist. See Frames design guidelines: automatic no-frames content for more details.

An example follows:

<FRAMESET ROWS="*,100">
  <FRAMESET COLS="40%,*">
    <FRAME NAME="Menu" SRC="nav.html" TITLE="Menu">
    <FRAME NAME="Content" SRC="main.html" TITLE="Content">
  </FRAMESET>
  <FRAME NAME="Ad" SRC="ad.html" TITLE="Advertisement">
  <NOFRAMES>
    <BODY>
      <H1>Table of Contents</H1>
      <UL>
        <LI>
          <A HREF="reference/html40/">HTML 4.0 Reference</A>
        </LI>
        <LI>
          <A HREF="reference/wilbur/">HTML 3.2 Reference</A>
        </LI>
        <LI>
          <A HREF="reference/css/">CSS Guide</A>
        </LI>
      </UL>
      <P>
        <IMG SRC="ad.gif" ALT="Ad: Does your bank charge too much?">
      </P>
    </BODY>
  </NOFRAMES>
</FRAMESET>

In HTML 4.0 Transitional, the NOFRAMES element is also permitted within most block-level elements. This allows authors to include content, such as navigation aids, that should only be displayed if the document is not being viewed within a frameset. Such use helps to ensure that a frame could stand on its own if bookmarked or accessed through a search engine while not burdening the frames user with duplicate content. However, most browsers do not support this use of NOFRAMES and will always display the content.

More Information

u NOFRAMES in W3C HTML 4.0 Recommendation

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


NOSCRIPT - Non-script Content

NOSCRIPT - Non-script Content

Syntax <NOSCRIPT>...</NOSCRIPT>
Attribute Specifications u common attributes
Contents Block-level elements, inline elements
Contained in APPLET, BLOCKQUOTE, BODY, BUTTON, CENTER, DD, DEL, DIV, FIELDSET, FORM, IFRAME, INS, LI, MAP, NOFRAMES, NOSCRIPT, OBJECT, TD, TH

The NOSCRIPT element provides alternate content for a client-side script that was not executed. A script will fail to execute if the browser does not support the scripting language or if the user has disabled client-side scripting. NOSCRIPT should follow the SCRIPT element for which it provides alternate content.

Note that most browsers will fail to render the contents of NOSCRIPT if the scripting language is not supported and the user has enabled client-side scripting. Most browsers will only render NOSCRIPT when the user has disabled client-side scripting.

Also note that Netscape Navigator 2.x supports JavaScript 1.0 but still renders all NOSCRIPT content.

Since client-side scripts usually provide dynamic interactivity that cannot be replaced by static content, the NOSCRIPT element is generally not useful. Authors should try to use client-side scripts as optional enhancements that are not integral components of the Web page. In the case of form validation, any error checking done by the client-side script should be repeated by the CGI script or Java servlet that handles the submission at the server.

More Information

u NOSCRIPT in W3C HTML 4.0 Recommendation

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


OBJECT - Embedded Object

OBJECT - Embedded Object

Syntax <OBJECT>...</OBJECT>
Attribute Specifications u DATA=URI (object data)  u CLASSID=URI (location of implementation)  u ARCHIVE=CDATA (archive files)  u CODEBASE=URI (base URI for CLASSID, DATA, ARCHIVE)  u WIDTH=Length (object width)  u HEIGHT=Length (object height)  u NAME=CDATA (name for form submission)  u USEMAP=URI (client-side image map)  u TYPE=ContentType (content-type of object)  u CODETYPE=ContentType (content-type of code)  u STANDBY=Text (message to show while loading)  u TABINDEX=NUMBER (position in tabbing order)  u DECLARE (do not instantiate object)  u ALIGN=[ top | middle | bottom | left | right ] (object alignment)  u BORDER=Length (link border width)  u HSPACE=Pixels (horizontal gutter)  u VSPACE=Pixels (vertical gutter)  u common attributes
Contents PARAM elements followed by block-level elements and/or inline elements
Contained in HEAD, inline elements, block-level elements except PRE

The OBJECT element is used to include objects such as images, videos, Java applets, and VRML worlds. OBJECT is intended to replace the more specific IMG and APPLET elements, as well as the proprietary EMBED and BGSOUND elements, though a lack of browser support and severe bugs in supporting browsers make the other elements a better choice for the time being.

OBJECT's DATA attribute specifies the URI of the embedded object. Relative URIs are interpreted with respect to the CODEBASE attribute if it is given.

The WIDTH and HEIGHT attributes define the dimensions of the object. The value may be given in pixels or as a percentage of the parent element's width or height. Most browsers require the WIDTH and HEIGHT attributes for all objects embedded using OBJECT.

The CLASSID may be used to specify an implementation for the object. Java applets, Python applets, and ActiveX controls all provide implementations for the embedded object, and so are specified with the CLASSID attribute, as in the following example:

<OBJECT CLASSID="yahtzee.py" CODETYPE="application/x-python" STANDBY="Ready to play Yahtzee?" TITLE="My Yahtzee Game">
<OBJECT CLASSID="java:Yahtzee.class" CODETYPE="application/java" WIDTH=400 HEIGHT=250 STANDBY="Ready to play Yahtzee?" TITLE="My Yahtzee Game">
<OBJECT DATA="yahtzee.gif" TYPE="image/gif" TITLE="A Yahtzee animation" WIDTH=200 HEIGHT=100>
Yahtzee is my <EM>favorite</EM> game!
</OBJECT>
</OBJECT>
</OBJECT>

This example also demonstrates the use of alternate content for browsers that cannot display the embedded object. In the example, a Yahtzee game written in Python is used if the browser supports it. A Java version is provided as an alternate for browsers that do not support Python applets. An image is given for browsers that cannot show the Java or Python applets, and plain text is used as a final alternate if images are not loaded. Note that OBJECT is backwards compatible with pre-HTML 4.0 browsers since they will ignore the <OBJECT> tags and render the innermost alternate content (the text in the example).

The preceding example also makes use of the TYPE and CODETYPE attributes to allow browsers to avoid requesting a file that they cannot render. The TYPE attribute specifies the media type of the resource referenced by the DATA attribute while the CODETYPE attribute specifies the media type of the CLASSID data.

The STANDBY attribute is also utilized in the example. This attribute provides short text to display while the object is loading.

The ARCHIVE attribute can specify a space-separated list of archived files (either absolute URIs or URIs relative to the CODEBASE), allowing the browser to download many files with a single connection and hence decreasing the total download time. The standard archive format for Java files is JAR. JAR files can be created with the jar tool included with the Java Development Kit 1.1 and up.

The DECLARE attribute makes the object a declaration that is not immediately instantiated. This allows the object to be instantiated from a link, button, or object later in the same document. The ID attribute must be used with declared objects as an identifier for the instantiating element. For example:

<OBJECT DECLARE ID=yahtzee CLASSID="java:Yahtzee.class" CODETYPE="application/java" WIDTH=400 HEIGHT=250 TITLE="My Yahtzee Game">
<IMG SRC="yahtzee.gif" ALT="You get the dice!" TITLE="Yahtzee animation">
</OBJECT>
...
<P>Ready to <A HREF="#yahtzee">play Yahtzee</A>?</P>

The OBJECT element may contain PARAM elements--before any other content--to provide run-time initialization data. The following example embeds a video, with an audio clip for alternate content, and includes parameters commonly understood by audio/video plug-ins. Note the placement of PARAM elements before alternate content.

<OBJECT DATA="mlk.mov" TYPE="video/quicktime" TITLE="Martin Luther King's &quot;I Have a Dream&quot; speech" WIDTH=150 HEIGHT=150>
<PARAM NAME=pluginspage VALUE="http://quicktime.apple.com/">
<PARAM NAME=autoplay VALUE=true>
<OBJECT DATA="mlk.wav" TYPE="audio/x-wav" TITLE="Martin Luther King's &quot;I Have a Dream&quot; speech">
<PARAM NAME=autostart VALUE=true>
<PARAM NAME=hidden VALUE=true>
<A HREF="mlk.html">Full text of Martin Luther King's "I Have a Dream" speech</A>
</OBJECT>
</OBJECT>

The USEMAP attribute can be used with OBJECT to embed a clickable image where different coordinates have different link destinations. Image maps via the IMG element are better supported, but OBJECT-based image maps allow a full textual alternative for browsers not loading images. The USEMAP attribute points to a MAP element whose contents define the links of the various coordinates. The MAP may be included within the OBJECT, in which case its contents are not rendered on image-loading browsers, or it may be given outside the OBJECT element so that its contents are rendered.

The following example gives two images, one an alternate if the first type of image is not supported. The images share a single image map definition, which is included within the OBJECT element. The MAP element contains a menu of links to be rendered on browsers not loading images.

<OBJECT DATA="sitemap.png" USEMAP="#map" TYPE="image/png" TITLE="Site map" WIDTH=300 HEIGHT=200>
<OBJECT DATA="sitemap.gif" USEMAP="#map" TYPE="image/gif" TITLE="Site map" WIDTH=300 HEIGHT=200>
<MAP NAME=map>
<UL>
<LI><A href="http://www.htmlhelp.com/reference/" COORDS="5,5,95,195">HTML and CSS Reference</A></LI>
<LI><A href="http://www.htmlhelp.com/design/" COORDS="105,5,195,195">Design Guide</A></LI>
<LI><A href="http://www.htmlhelp.com/tools/index.html" COORDS="205,5,295,195">Tools</A></LI>
</UL>
</MAP>
</OBJECT>
</OBJECT>

The TABINDEX attribute specifies a number between 0 and 32767 to indicate the tabbing order of the element. An object with TABINDEX=0 or no TABINDEX attribute will be visited after any elements with a positive TABINDEX. Among positive TABINDEX values, the lower number receives focus first. In the case of a tie, the element appearing first in the HTML document takes precedence.

The ALIGN attribute, deprecated in HTML 4.0, specifies the alignment of the object. The values top, middle, and bottom specify the object's position with respect to surrounding content on its left and right.

ALIGN=middle aligns the center of the object with the current baseline. To center the object horizontally on the page, place the object in a centered block, e.g.,

<P ALIGN=center><OBJECT DATA="foo.mov" TYPE="video/quicktime"></OBJECT></P>

The other ALIGN values, left and right, specify a floating object; the object is placed at the left or right margin and content flows around it. To place content below the object, use <BR CLEAR=left|right|all> as appropriate.

The vertical-align and float properties of Cascading Style Sheets provide more flexible methods of aligning objects.

The BORDER attribute, deprecated in HTML 4.0, specifies the width of the object's border. Specifying BORDER=0 will eliminate the border around a linked object in most browsers, though some allow the user to override this. Authors should only use BORDER=0 if the object would be clearly recognizable as a link, or as a method of de-emphasizing a link. For example:

<A HREF="reference/"><OBJECT DATA="icon/reference.gif" WIDTH=90 HEIGHT=90 BORDER=0></OBJECT>Web Authoring Reference</A>

The deprecated HSPACE and VSPACE attributes allow an author to suggest horizontal gutters and vertical gutters, respectively, around the object. The value must be in pixels and applies to both sides of the object. Style sheets provide more flexibility in specifying the space around objects.

The OBJECT element is most useful as a BODY element and can be contained within either inline or block-level elements. The contents of OBJECT should be elements that can be contained within OBJECT's parent element. For example, an A element containing an OBJECT should not have any block-level elements as the contents of the OBJECT.

More Information

u OBJECT in W3C HTML 4.0 Recommendation

u The Java Tutorial

u ActiveX Controls

u Python Language Home Page

u PNG (Portable Network Graphics) Home Page

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


OPTGROUP - Option Group

OPTGROUP - Option Group

Syntax <OPTGROUP>...</OPTGROUP>
Attribute Specifications u LABEL=Text (group label)  u DISABLED (disable group of choices)  u common attributes
Contents One or more OPTION elements
Contained in SELECT

The OPTGROUP element defines a group of choices within a SELECT menu. OPTGROUP must contain one or more OPTION elements to define the actual choices.

The required LABEL attribute specifies the group label presented to the user. The LABEL should describe the group of choices available through the OPTGROUP's OPTIONs. Each OPTION generally uses a LABEL attribute as well to provide a shortened label that, together with the OPTGROUP's LABEL, gives a complete description of the option. An example follows:

<P>Which Web browser do you use most often?
  <SELECT NAME=browser>
    <OPTGROUP LABEL="Netscape Navigator">
      <OPTION LABEL="4.x or higher">
        Netscape Navigator 4.x or higher
      </OPTION>
      <OPTION LABEL="3.x">Netscape Navigator 3.x</OPTION>
      <OPTION LABEL="2.x">Netscape Navigator 2.x</OPTION>
      <OPTION LABEL="1.x">Netscape Navigator 1.x</OPTION>
    </OPTGROUP>
    <OPTGROUP LABEL="Microsoft Internet Explorer">
      <OPTION LABEL="4.x or higher">
        Microsoft Internet Explorer 4.x or higher
      </OPTION>
      <OPTION LABEL="3.x">Microsoft Internet Explorer 3.x</OPTION>
      <OPTION LABEL="2.x">Microsoft Internet Explorer 2.x</OPTION>
      <OPTION LABEL="1.x">Microsoft Internet Explorer 1.x</OPTION>
    </OPTGROUP>
    <OPTGROUP LABEL="Opera">
      <OPTION LABEL="3.x or higher">Opera 3.x or higher</OPTION>
      <OPTION LABEL="2.x">Opera 2.x</OPTION>
    </OPTGROUP>
    <OPTION>Other</OPTION>
  </SELECT>
</P>

OPTGROUP is not well supported by current browsers, but its design allows authors to use it today without sacrificing compatibility with non-supporting browsers. Supporting browsers will render the preceding example using the LABEL attribute of OPTION to provide just the version number, along with the OPTGROUP's LABEL, which gives the full name of the application. This allows a compact display with easy-to-use cascading menus.

Non-supporting browsers will ignore the OPTGROUP elements and LABEL attributes, providing the full name and version for each choice. Thus authors can fully use OPTGROUP despite its lack of browser support.

Note that, in HTML 4.0, OPTGROUP is limited to containing only OPTION elements, thus preventing nested OPTGROUPs with multi-level cascades. Future versions of HTML may add support for nested option groups.

The boolean DISABLED attribute makes the option group unavailable. The options of a disabled option group cannot be selected by the user and are never submitted with the form.

More Information

u OPTGROUP in W3C HTML 4.0 Recommendation

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


Q - Short Quotation

Q - Short Quotation

Syntax <Q>...</Q>
Attribute Specifications u CITE=URI (source of quotation)  u common attributes
Contents Inline elements
Contained in Inline elements, block-level elements

The Q element is used for short, inline quotations. For longer (block) quotations, use the BLOCKQUOTE element.

The Q element's optional CITE attribute provides a URI of the source of the quotation. Some examples follow:

<P>In the words of Albert Einstein, <Q>God does <EM>not</EM> play dice.</Q></P>

<P>According to Dave Raggett, <Q CITE="http://www.w3.org/Press/HTML4-REC">HTML 4.0 gives Web designers the ability to create dynamic visually exciting pages that are accessible to all.</Q></P>

Note that authors should not include their own quotation marks when using the Q element. However, this can be a problem since almost all current browsers lack support for Q. Authors may prefer to avoid Q and insert their own quotation marks. Another alternative is to use I in combination with Q so that the quotation is distinguished from other text in most browsers. The previous example could also be given as follows:

<P>According to Dave Raggett, <I><Q CITE="http://www.w3.org/Press/HTML4-REC">HTML 4.0 gives Web designers the ability to create dynamic visually exciting pages that are accessible to all.</Q></I></P>

Browsers supporting Q should properly handle nested quotations. They should also use quotation marks suitable to the language of the quotation, based on the LANG attribute of Q or the language of its parent.

More Information

u Q in W3C HTML 4.0 Recommendation

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


S - Strike-through Text

S - Strike-through Text

Syntax <S>...</S>
Attribute Specifications u common attributes
Contents Inline elements
Contained in Inline elements, block-level elements

The S element, deprecated in HTML 4.0, suggests that text be rendered with a strike-through style. In many cases, use of a phrase element such as DEL is more appropriate since such elements express the meaning of the text more clearly. However, since support for DEL among browsers is weak, S could be useful in combination with DEL, as in the following example:

The latest version of HTML recommended by the W3C is HTML <DEL DATETIME="1997-12-19T00:00:00-05:00"><S>3.2</S></DEL> <INS DATETIME="1997-12-19T00:00:00-05:00">4.0</INS>.

Note that STRIKE is better supported than S (based on Netscape 2.x and 1.22 supporting STRIKE but not S), and so STRIKE should be used in place of S. There does not appear to be any advantage to using both STRIKE and S; all browsers that support S also seem to support STRIKE.

If DEL is not a suitable structure, style sheets should be used to complement or replace instances of S. CSS1 provides the text-decoration property for strike-through text.

More Information

u S in W3C HTML 4.0 Recommendation

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


SPAN - Generic Inline Container

SPAN - Generic Inline Container

Syntax <SPAN>...</SPAN>
Attribute Specifications u common attributes
Contents Inline elements
Contained in Inline elements, block-level elements

The SPAN element is a generic inline container. SPAN carries no structural meaning itself, but it can be used to provide extra structure through its LANG, DIR, CLASS, and ID attributes. Style sheets are often used to suggest a presentation for a given class or ID.

SPAN should only be used where no other HTML inline element provides a suitable meaning. If a presentation such as bold or italic text would be suitable on visual browsers, authors may prefer to use an appropriate font style element. For example:

1. <P><SPAN LANG=fr>La Révolution Tranquille</SPAN> shook Quebec in the early 1960's.

2. <P><I LANG=fr>La Révolution Tranquille</I> shook Quebec in the early 1960's.

These examples are identical in meaning, but the second example uses the I element to suggest italic text.

DIV is a block-level equivalent of SPAN for containing block-level elements such as P and TABLE.

More Information

u SPAN in W3C HTML 4.0 Recommendation

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


TBODY - Table Body

TBODY - Table Body

Syntax <TBODY>...</TBODY>
Attribute Specifications u ALIGN=[ left | center | right | justify | char ] (horizontal alignment of cells in group)  u CHAR=Character (alignment character for cells)  u CHAROFF=Length (alignment character offset)  u VALIGN=[ top | middle | bottom | baseline ] (vertical alignment of cells in group)  u common attributes
Contents One or more TR elements
Contained in TABLE

The TBODY element defines a group of data rows in a table. A TABLE must have one or more TBODY elements, which must follow the optional TFOOT. The TBODY end tag is always optional. The start tag is optional when the table contains only one TBODY and no THEAD or TFOOT. This allows the simple table structure of HTML 3.2 to still be valid:

<TABLE>
  <TR>
    <TH>Abbreviation</TH>
    <TH>Long Form</TH>
  </TR>
  <TR>
    <TD>AFAIK</TD>
    <TD>As Far As I Know</TD>
  </TR>
</TABLE>

By explicitly grouping rows with THEAD, TFOOT, and TBODY, authors give browsers the ability to present a long table with a scrolling body and static header and footer rows. Using TBODY also provides the ability to easily suggest different presentations for different row groups through style sheets. While few browsers currently support TBODY, it can be used with no harm on non-supporting browsers.

The following example gives a table of SI units of measure. TBODY elements are used to group rows based on whether the unit is classed as a "base" unit, "derived" unit, or "supplementary" unit.

<TABLE SUMMARY="This table lists SI (International System) units of
                measure, giving the name of the unit, its symbol, and
                the quantity that it measures.">
  <CAPTION>SI Units</CAPTION>
  <THEAD>
    <TR>
      <TH SCOPE=col>Name</TH>
      <TH SCOPE=col>Symbol</TH>
      <TH SCOPE=col>Quantity</TH>
    </TR>
  </THEAD>
  <TBODY CLASS=base>
    <TR>
      <TD SCOPE=row>meter</TD>
      <TD>m</TD>
      <TD>length</TD>
    </TR>
    <TR>
      <TD SCOPE=row>kilogram</TD>
      <TD>kg</TD>
      <TD>mass</TD>
    </TR>
    ...
  </TBODY>
  <TBODY CLASS=derived>
    <TR>
      <TD SCOPE=row>hertz</TD>
      <TD>Hz</TD>
      <TD>frequency</TD>
    </TR>
    <TR>
      <TD SCOPE=row>pascal</TD>
      <TD>Pa</TD>
      <TD>pressure</TD>
    </TR>
    ...
  </TBODY>
  <TBODY CLASS=supplementary>
    <TR>
      <TD SCOPE=row>radian</TD>
      <TD>rad</TD>
      <TD>plane angle</TD>
    </TR>
    ...
  </TBODY>
</TABLE>

In addition to the attributes common to most elements, TBODY takes presentational attributes for specifying the alignment of cell data. Since few browsers support TBODY, authors may wish to specify these attributes on the TR or TD elements instead.

The ALIGN attribute specifies the horizontal alignment for each cell in the row group. Possible values are left, center, right, justify, and char. ALIGN=char aligns a cell's contents on the character given in the CHAR attribute. The default value for the CHAR attribute is the decimal point of the current language--a period in English. The CHAROFF attribute specifies the offset to the first occurrence of the alignment character. The attribute's value is a number in pixels or a percentage of the cell's width; CHAROFF="50%" centers the alignment character horizontally in a cell.

The VALIGN attribute specifies the vertical position of a cell's contents. Possible values are:

u top, which positions data at the top of the cell;

u middle, the default value, which centers the cell data vertically;

u bottom, which positions data at the bottom of the cell;

u baseline, which specifies that the first line of each cell in the row with ALIGN=baseline should occur on a common baseline.

More Information

u TBODY in W3C HTML 4.0 Recommendation

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


TFOOT - Table Foot

TFOOT - Table Foot

Syntax <TFOOT>...</TFOOT>
Attribute Specifications u ALIGN=[ left | center | right | justify | char ] (horizontal alignment of cells in group)  u CHAR=Character (alignment character for cells)  u CHAROFF=Length (alignment character offset)  u VALIGN=[ top | middle | bottom | baseline ] (vertical alignment of cells in group)  u common attributes
Contents One or more TR elements
Contained in TABLE

The TFOOT element defines a group of footer rows in a table. A TABLE may have one TFOOT, which must follow the optional THEAD and precede the required TBODY.

By explicitly grouping footer rows with TFOOT, authors give browsers the ability to include the footer rows on each page of a printed, multi-page table, as well as the ability to present a long table with a scrolling body and static footer rows. However, few browsers currently support TFOOT, and the requirement that it be placed before the TBODY may make it unsuitable for non-supporting browsers. If the presentation of footer rows prior to body rows is not acceptable, authors should avoid using TFOOT until browser support is greater.

A table footer may provide a summary row or footnotes that apply to the entire table or portions of it. The following example uses TFOOT to contain footnotes for a table:

<TABLE SUMMARY="This table lists program available at the university
                based on the discipline and type of degree.">
  <CAPTION>Programs Available</CAPTION>
  <COLGROUP CLASS="program-discipline">
  <COLGROUP CLASS="program-type" SPAN=5>
  <THEAD>
    <TR>
      <TH SCOPE=col>Program</TH>
      <TH SCOPE=col>Honors Co-op</TH>
      <TH SCOPE=col>Honors Regular</TH>
      <TH SCOPE=col>General Regular</TH>
      <TH SCOPE=col>*Preprofessional or Professional</TH>
    </TR>
  </THEAD>
  <TFOOT CLASS=footnote>
    <TR>
      <TD COLSPAN=5>
          Many disciplines are also available as Minors and Joint
          Honors programs.
      </TD>
    </TR>
    <TR>
      <TD COLSPAN=5>
        * Preprofessional programs normally fulfull the academic
          requirements for registration in the related professions.
      </TD>
    </TR>
  </TFOOT>
  <TBODY>
    <TR>
      <TD SCOPE=row>Computer Science</TD>
      <TD>yes</TD>
      <TD>yes</TD>
      <TD>no</TD>
      <TD>no</TD>
    </TR>
    ...
  </TBODY>
</TABLE>

In addition to the attributes common to most elements, TFOOT takes presentational attributes for specifying the alignment of cell data. Since few browsers support TFOOT, authors may wish to specify these attributes on the TR or TD elements instead.

The ALIGN attribute specifies the horizontal alignment for each cell in the row group. Possible values are left, center, right, justify, and char. ALIGN=char aligns a cell's contents on the character given in the CHAR attribute. The default value for the CHAR attribute is the decimal point of the current language--a period in English. The CHAROFF attribute specifies the offset to the first occurrence of the alignment character. The attribute's value is a number in pixels or a percentage of the cell's width; CHAROFF="50%" centers the alignment character horizontally in a cell.

The VALIGN attribute specifies the vertical position of a cell's contents. Possible values are:

u top, which positions data at the top of the cell;

u middle, the default value, which centers the cell data vertically;

u bottom, which positions data at the bottom of the cell;

u baseline, which specifies that the first line of each cell in the row with ALIGN=baseline should occur on a common baseline.

More Information

u TFOOT in W3C HTML 4.0 Recommendation

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


THEAD - Table Head

THEAD - Table Head

Syntax <THEAD>...</THEAD>
Attribute Specifications u ALIGN=[ left | center | right | justify | char ] (horizontal alignment of cells in group)  u CHAR=Character (alignment character for cells)  u CHAROFF=Length (alignment character offset)  u VALIGN=[ top | middle | bottom | baseline ] (vertical alignment of cells in group)  u common attributes
Contents One or more TR elements
Contained in TABLE

The THEAD element defines a group of header rows in a table. A TABLE may have one THEAD, which must follow any CAPTION, COL, or COLGROUP elements, and precede the optional TFOOT and required TBODY elements.

By explicitly grouping header rows with THEAD, authors give browsers the ability to include the header rows on each page of a printed, multi-page table, as well as the ability to present a long table with a scrolling body and static header rows. While few browsers currently support THEAD, it can be used with no harm on non-supporting browsers.

The following example uses THEAD to group the two header rows of a table:

<TABLE SUMMARY="This table gives the character entity reference,
                decimal character reference, and hexadecimal character
                reference for 8-bit Latin-1 characters, as well as the
                rendering of each in your browser.">
  <COLGROUP>
  <COLGROUP SPAN=3>
  <COLGROUP SPAN=3>
  <THEAD>
    <TR>
      <TH SCOPE=col ROWSPAN=2>Character</TH>
      <TH SCOPE=col ROWSPAN=2>Entity</TH>
      <TH SCOPE=col ROWSPAN=2>Decimal</TH>
      <TH SCOPE=col ROWSPAN=2>Hex</TH>
      <TH SCOPE=colgroup COLSPAN=3>Rendering in Your Browser</TH>
    </TR>
    <TR>
      <TH SCOPE=col>Entity</TH>
      <TH SCOPE=col>Decimal</TH>
      <TH SCOPE=col>Hex</TH>
    </TR>
  </THEAD>
  <TBODY>
    <TR>
      <TD SCOPE=row>non-breaking space</TD>
      <TD>&amp;nbsp;</TD>
      <TD>&amp;#160;</TD>
      <TD>&amp;#xA0;</TD>
      <TD>&nbsp;</TD>
      <TD>&#160;</TD>
      <TD>&#xA0;</TD>
    </TR>
    ...
  </TBODY>
</TABLE>

In addition to the attributes common to most elements, THEAD takes presentational attributes for specifying the alignment of cell data. Since few browsers support THEAD, authors may wish to specify these attributes on the TR, TH, or TD elements instead.

The ALIGN attribute specifies the horizontal alignment for each cell in the row group. Possible values are left, center, right, justify, and char. ALIGN=char aligns a cell's contents on the character given in the CHAR attribute. The default value for the CHAR attribute is the decimal point of the current language--a period in English. The CHAROFF attribute specifies the offset to the first occurrence of the alignment character. The attribute's value is a number in pixels or a percentage of the cell's width; CHAROFF="50%" centers the alignment character horizontally in a cell.

The VALIGN attribute specifies the vertical position of a cell's contents. Possible values are:

u top, which positions data at the top of the cell;

u middle, the default value, which centers the cell data vertically;

u bottom, which positions data at the bottom of the cell;

u baseline, which specifies that the first line of each cell in the row with ALIGN=baseline should occur on a common baseline.

More Information

u THEAD in W3C HTML 4.0 Recommendation

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


HTML 4.0 Deprecated Features

HTML 4.0 Deprecated Features

A number of elements and attributes are deprecated in HTML 4.0 as an indication that other methods of accomplishing the same task are preferred. Deprecated features may become obsolete in future versions of HTML, though browsers that support the features will likely continue to support them. Deprecated features are included in HTML 4.0 Transitional and HTML 4.0 Frameset but not HTML 4.0 Strict.

Many presentational elements and attributes are deprecated in favor of style sheets, which allow authors to suggest a presentation with more flexibility and without sacrificing accessibility. Presentational attributes that cannot currently be replaced with style sheets are in most cases not deprecated.

The following elements are deprecated in favor of style sheets:

u BASEFONT - Base font change

u CENTER - Centered block

u FONT - Font change

u S - Strike-through text

u STRIKE - Strike-through text

u U - Underlined text

The following elements are also deprecated:

u APPLET - Java applet (deprecated in favor of OBJECT)

u DIR - Directory list (deprecated in favor of UL)

u ISINDEX - Input prompt (deprecated in favor of INPUT)

u MENU - Menu list (deprecated in favor of UL)

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


TABLE - Table

TABLE - Table

Syntax <TABLE>...</TABLE>
Attribute Specifications u SUMMARY=Text (purpose/structure of table)  u WIDTH=Length (table width)  u BORDER=Pixels (border width)  u FRAME=[ void | above | below | hsides | lhs | rhs | vsides | box | border ] (outer border)  u RULES=[ none | groups | rows | cols | all ] (inner borders)  u CELLSPACING=Length (spacing between cells)  u CELLPADDING=Length (spacing within cells)  u ALIGN=[ left | center | right ] (table alignment)  u BGCOLOR=Color (table background color)  u common attributes
Contents An optional CAPTION, followed by zero or more COL and COLGROUP elements, followed by an optional THEAD element, an optional TFOOT element, and then one or more TBODY elements
Contained in APPLET, BLOCKQUOTE, BODY, BUTTON, CENTER, DD, DEL, DIV, FIELDSET, FORM, IFRAME, INS, LI, MAP, NOFRAMES, NOSCRIPT, OBJECT, TD, TH

The TABLE element defines a table for multi-dimensional data arranged in rows and columns. TABLE is commonly used as a layout device, but authors should avoid this practice as much as possible. Tables can cause problems for users of narrow windows, large fonts, or non-visual browsers, and these problems are often accentuated when tables are used solely for layout purposes. As well, current visual browsers will not display anything until the complete table has been downloaded, which can have very noticeable effects when an entire document is laid out within a TABLE. Authors should try to use style sheets in place of TABLE for layout, though bugs in current browser implementations of style sheets can make this difficult.

The TABLE may contain a number of optional elements to provide a rich structure to the table. The optional CAPTION element gives a caption for the table and is followed by optional COL and COLGROUP elements that specify column widths and groupings. The THEAD, TFOOT, and TBODY elements then follow with groups of rows. The optional THEAD and TFOOT elements contain header and footer rows, respectively, while TBODY elements supply the table's main row groups. A row group contains TR elements for individual rows, and each TR contains TH or TD elements for header cells or data cells, respectively.

At least one TBODY element is required within a TABLE, but TBODY's start and end tags are both optional if there is only one TBODY and no THEAD or TFOOT. A simple table could thus be expressed as follows:

<TABLE>
  <TR>
    <TH>Abbreviation</TH>
    <TH>Long Form</TH>
  </TR>
  <TR>
    <TD>AFAIK</TD>
    <TD>As Far As I Know</TD>
  </TR>
  <TR>
    <TD>IMHO</TD>
    <TD>In My Humble Opinion</TD>
  </TR>
  <TR>
    <TD>OTOH</TD>
    <TD>On The Other Hand</TD>
  </TR>
</TABLE>

The same table could be expressed with a richer structure by grouping rows and adding a caption, as in the next example. The extra structural information allows an author to more easily suggest the presentation of the table using style sheets or TABLE's presentational attributes.

<TABLE>
  <CAPTION>Common Usenet Abbreviations</CAPTION>
  <THEAD>
    <TR>
      <TH>Abbreviation</TH>
      <TH>Long Form</TH>
    </TR>
  </THEAD>
  <TBODY>
    <TR>
      <TD>AFAIK</TD>
      <TD>As Far As I Know</TD>
    </TR>
    <TR>
      <TD>IMHO</TD>
      <TD>In My Humble Opinion</TD>
    </TR>
    <TR>
      <TD>OTOH</TD>
      <TD>On The Other Hand</TD>
    </TR>
  </TBODY>
</TABLE>

The TABLE element takes an optional SUMMARY attribute to describe the purpose and/or structure of the table. The overview provided by the SUMMARY attribute is particularly helpful to users of non-visual browsers. With simple tables, a good CAPTION is usually a sufficient summary, but complex tables may benefit from a more detailed overview via the SUMMARY attribute. The following example uses SUMMARY to describe a table. Note that the summary could also be included in a paragraph before the table, which is helpful since few browsers support SUMMARY.

<TABLE SUMMARY="This table gives the character entity reference,
                decimal character reference, and hexadecimal character
                reference for symbols and Greek letters.">
  <COLGROUP>
  <COLGROUP SPAN=3>
  <THEAD>
    <TR>
      <TH SCOPE=col>Character</TH>
      <TH SCOPE=col>Entity</TH>
      <TH SCOPE=col>Decimal</TH>
      <TH SCOPE=col>Hex</TH>
    </TR>
  </THEAD>
  <TBODY>
    <TR>
      <TD SCOPE=row>Latin small f with hook</TD>
      <TD>&amp;fnof;</TD>
      <TD>&amp;#402;</TD>
      <TD>&amp;#x192;</TD>
    </TR>
    ...
  </TBODY>
</TABLE>

The TABLE element also takes a number of optional attributes to provide presentational hints in visual browsers. Equivalents of these attributes in Cascading Style Sheets are under development and not widely supported by browsers.

u The WIDTH attribute specifies the width of the table as a number of pixels or as a percentage of the available horizontal space. Widths in pixels should be avoided, especially widths above 500 pixels, since this causes unnecessary horizontal scrolling for some users.

u The BORDER attribute specifies the width in pixels of the border around a table.

u The FRAME attribute, poorly supported by browsers, specifies which sides of the table's outer border are visible. Possible values are void for no border, above for a top border only, below for a bottom border only, hsides for left and right borders only, vsides for top and bottom borders only, lhs for a left border only, rhs for a right border only, and either box or border for a border on all sides. The default value is void unless the BORDER attribute gives a positive width, in which case FRAME=border is the default. <TABLE BORDER> is a valid, well-supported shorthand for <TABLE FRAME=border>.

u The RULES attribute, poorly supported by browsers, specifies the borders between table cells. Possible values are none for no inner borders, groups for borders between row groups and column groups only, rows for borders between rows only, cols for borders between columns only, and all for borders between all cells. None is the default value if BORDER=0 is used or if no BORDER attribute is given. All is the default value for any other use of BORDER.

u The CELLSPACING attribute defines the amount of space between table cells, and the CELLPADDING attribute defines the amount of space within table cells (i.e., between the border and cell contents). The value may be given as a number of pixels or as a percentage, though most browsers do not support percentages, treating CELLPADDING="20%" as if it were CELLPADDING="20". A percentage value is relative to the vertical space available for vertical padding or spacing, and the amount is split evenly between the top and bottom. Horizontal padding and spacing behave similarly. The padding or spacing is always applied to all four sides.

The padding properties of Cascading Style Sheets allow an author to suggest different padding for different sides, but are not as well supported as the CELLPADDING attribute.

u The deprecated ALIGN attribute suggests the horizontal alignment of the table on visual browsers. Possible values are left, right, and center. Browsers generally present left- or right-aligned tables as floating tables, with the content following the TABLE flowing around it. To prevent content from flowing around the table, use <BR CLEAR=all> after the end of the TABLE.

Since many browsers do not support ALIGN=center with TABLE, authors may wish to place the TABLE within a CENTER element.

Style sheets provide more flexibility in suggesting table alignment but with less browser support than the ALIGN attribute.

u The deprecated BGCOLOR attribute suggests a background color for the table. The combination of this attribute with <FONT COLOR=...> can leave invisible or unreadable text on Netscape Navigator 2.x, which does not support BGCOLOR on table elements. BGCOLOR is dangerous even on supporting browsers, since most fail to override it when overriding other author-specified colors. Style sheets provide a safer, more flexible method of specifying a table's background color.

More Information

u TABLE in W3C HTML 4.0 Recommendation

u TABLE in W3C HTML 3.2 Recommendation

u TABLE in WDG HTML 3.2 Reference

u TABLE in Learning HTML 3.2 by Examples

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


TH - Table Header Cell

TH - Table Header Cell

Syntax <TH>...</TH>
Attribute Specifications u ROWSPAN=Number (rows spanned by the cell)  u COLSPAN=Number (columns spanned by the cell)  u HEADERS=IDREFS (list of header cells for current cell)  u ABBR=Text (abbreviation for header cell)  u SCOPE=[ row | col | rowgroup | colgroup ] (cells covered by header cell)  u AXIS=CDATA (category of header cell)  u ALIGN=[ left | center | right | justify | char ] (horizontal alignment)  u CHAR=Character (alignment character)  u CHAROFF=Length (alignment character offset)  u VALIGN=[ top | middle | bottom | baseline ] (vertical alignment)  u WIDTH=Pixels (cell width)  u HEIGHT=Pixels (cell height)  u NOWRAP (suppress word wrap)  u BGCOLOR=Color (cell background color)  u common attributes
Contents Inline elements, block-level elements
Contained in TR

The TH element defines a header cell in a table. TH elements are contained within a TR element (a table row), which may also contain TD elements for data cells. When a cell's contents act as both header information and table data, TD should be used.

The ROWSPAN and COLSPAN attributes of TH specify the number of rows and the number of columns, respectively, that are spanned by the cell. The default value is 1. The special value 0 indicates that the cell spans all rows or columns to the end of the table. The value 0 is ignored by most browsers, so authors may wish to calculate the exact number of rows or columns spanned and use that value.

The HEADERS attribute specifies the header cells that apply to the TH. The value is a space-separated list of the header cells' ID attribute values. The HEADERS attribute allows non-visual browsers to render the header information for a given cell.

The ABBR attribute gives an abbreviated version of the cell's content. This allows visual browsers to use the short form if space is limited, and non-visual browsers can give a cell's header information in an abbreviated form before rendering each cell.

The SCOPE attribute specifies the cells for which the TH element provides header information. SCOPE is a simpler alternative to using HEADERS if the arrangement of header cells is not complex. Possible values are as follows:

u row, when the TH provides header information for the rest of the row;

u col, when the TH provides header information for the rest of the column;

u rowgroup, when the TH gives header information for the rest of the row group (i.e., the remaining cells of the THEAD, TFOOT, or TBODY);

u colgroup, when the TH gives header information for the rest of the column group (i.e., the remaining cells of the COLGROUP).

The AXIS attribute provides a method of categorizing cells. The attribute's value is a comma-separated list of category names. See the HTML 4.0 Recommendation's section on categorizing cells for an application of AXIS.

In addition to the attributes common to most elements, TH takes a number of presentational attributes. Style sheets provide a more flexible way to suggest a presentation for table cells, but TH's presentational attributes are more widely supported by current browsers.

The ALIGN attribute specifies the horizontal alignment for the cell. Possible values are left, center, right, justify, and char. ALIGN=char, poorly supported among browsers, aligns a cell's contents on the character given in the CHAR attribute. The default value for the CHAR attribute is the decimal point of the current language--a period in English. The CHAROFF attribute specifies the offset to the first occurrence of the alignment character. The attribute's value is a number in pixels or a percentage of the cell's width; CHAROFF="50%" centers the alignment character horizontally in a cell.

The VALIGN attribute specifies the vertical position of a cell's contents. Possible values are:

u top, which positions data at the top of the cell;

u middle, the default value, which centers the cell data vertically;

u bottom, which positions data at the bottom of the cell;

u baseline, which specifies that the first line of each cell in the row with ALIGN=baseline should occur on a common baseline.

The WIDTH, HEIGHT, NOWRAP, and BGCOLOR attributes are all deprecated in favor of style sheets. WIDTH and HEIGHT suggest the cell's width and height in pixels. The boolean NOWRAP attribute tells visual browsers to disable word wrap for the cell, which can result in unnecessary horizontal scrolling depending on the user's window width and font size.

The BGCOLOR attribute suggests a background color for the cell. The combination of this attribute with <FONT COLOR=...> can leave invisible or unreadable text on Netscape Navigator 2.x, which does not support BGCOLOR on table elements. BGCOLOR is dangerous even on supporting browsers, since most fail to override it when overriding other author-specified colors. Style sheets provide a safer, more flexible method of specifying a table's background color.

More Information

u TH in W3C HTML 4.0 Recommendation

u TH in W3C HTML 3.2 Recommendation

u TH in WDG HTML 3.2 Reference

u TH in Learning HTML 3.2 by Examples

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


TD - Table Data Cell

TD - Table Data Cell

Syntax <TD>...</TD>
Attribute Specifications u ROWSPAN=Number (rows spanned by the cell)  u COLSPAN=Number (columns spanned by the cell)  u HEADERS=IDREFS (list of header cells for current cell)  u ABBR=Text (abbreviation for header cell)  u SCOPE=[ row | col | rowgroup | colgroup ] (cells covered by header cell)  u AXIS=CDATA (category of header cell)  u ALIGN=[ left | center | right | justify | char ] (horizontal alignment)  u CHAR=Character (alignment character)  u CHAROFF=Length (alignment character offset)  u VALIGN=[ top | middle | bottom | baseline ] (vertical alignment)  u WIDTH=Pixels (cell width)  u HEIGHT=Pixels (cell height)  u NOWRAP (suppress word wrap)  u BGCOLOR=Color (cell background color)  u common attributes
Contents Inline elements, block-level elements
Contained in TR

The TD element defines a data cell in a table. TD elements are contained within a TR element (a table row), which may also contain TH elements for header cells. When a cell's contents act as both header information and table data, TD should be used.

The ROWSPAN and COLSPAN attributes of TD specify the number of rows and the number of columns, respectively, that are spanned by the cell. The default value is 1. The special value 0 indicates that the cell spans all rows or columns to the end of the table. The value 0 is ignored by most browsers, so authors may wish to calculate the exact number of rows or columns spanned and use that value.

The HEADERS attribute specifies the header cells that apply to the TD. The value is a space-separated list of the header cells' ID attribute values. The HEADERS attribute allows non-visual browsers to render the header information for a given cell.

The ABBR, SCOPE, and AXIS attributes should only be used if the cell provides header information. Like HEADERS, these attributes are new in HTML 4.0 and not well supported, though they should be particularly helpful to non-visual browsers in the future.

ABBR gives an abbreviated version of the cell's content. This allows visual browsers to use the short form if space is limited, and non-visual browsers can give a cell's header information in an abbreviated form before rendering each cell.

The SCOPE attribute specifies the cells for which the TD element provides header information. SCOPE is a simpler alternative to using HEADERS if the arrangement of header cells is not complex. Possible values are as follows:

u row, when the TD provides header information for the rest of the row;

u col, when the TD provides header information for the rest of the column;

u rowgroup, when the TD gives header information for the rest of the row group (i.e., the remaining cells of the THEAD, TFOOT, or TBODY);

u colgroup, when the TD gives header information for the rest of the column group (i.e., the remaining cells of the COLGROUP).

The AXIS attribute provides a method of categorizing cells. The attribute's value is a comma-separated list of category names. See the HTML 4.0 Recommendation's section on categorizing cells for an application of AXIS.

In addition to the attributes common to most elements, TD takes a number of presentational attributes. Style sheets provide a more flexible way to suggest a presentation for table cells, but TD's presentational attributes are more widely supported by current browsers.

The ALIGN attribute specifies the horizontal alignment for the cell. Possible values are left, center, right, justify, and char. ALIGN=char, poorly supported among browsers, aligns a cell's contents on the character given in the CHAR attribute. The default value for the CHAR attribute is the decimal point of the current language--a period in English. The CHAROFF attribute specifies the offset to the first occurrence of the alignment character. The attribute's value is a number in pixels or a percentage of the cell's width; CHAROFF="50%" centers the alignment character horizontally in a cell.

The VALIGN attribute specifies the vertical position of a cell's contents. Possible values are:

u top, which positions data at the top of the cell;

u middle, the default value, which centers the cell data vertically;

u bottom, which positions data at the bottom of the cell;

u baseline, which specifies that the first line of each cell in the row with ALIGN=baseline should occur on a common baseline.

The WIDTH, HEIGHT, NOWRAP, and BGCOLOR attributes are all deprecated in favor of style sheets. WIDTH and HEIGHT suggest the cell's width and height in pixels. The boolean NOWRAP attribute tells visual browsers to disable word wrap for the cell, which can result in unnecessary horizontal scrolling depending on the user's window width and font size.

The BGCOLOR attribute suggests a background color for the cell. The combination of this attribute with <FONT COLOR=...> can leave invisible or unreadable text on Netscape Navigator 2.x, which does not support BGCOLOR on table elements. BGCOLOR is dangerous even on supporting browsers, since most fail to override it when overriding other author-specified colors. Style sheets provide a safer, more flexible method of specifying a table's background color.

More Information

u TD in W3C HTML 4.0 Recommendation

u TD in W3C HTML 3.2 Recommendation

u TD in WDG HTML 3.2 Reference

u TD in Learning HTML 3.2 by Examples

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


IMG - Inline Image

IMG - Inline Image

Syntax <IMG>
Attribute Specifications u SRC=URI (location of image)  u ALT=Text (alternate text)  u LONGDESC=URI (link to long description)  u WIDTH=Length (image width)  u HEIGHT=Length (image height)  u USEMAP=URI (client-side image map)  u ISMAP (server-side image map)  u ALIGN=top|middle|bottom|left|right (image alignment)  u BORDER=Length (link border width)  u HSPACE=Pixels (horizontal gutter)  u VSPACE=Pixels (vertical gutter)  u common attributes
Contents Empty
Contained in Inline elements, block-level elements except PRE

The IMG element specifies an inline image. The required SRC attribute specifies the location of the image. The image can be any format, though browsers generally only support GIF and JPEG images. Support for the PNG image format is growing slowly.

The required ALT attribute provides alternate text for those not loading images. Effective ALT text should generally give the function of the image rather than a description of the image. For example, ALT="Welcome to XYZ Corp." would be more appropriate than ALT="XYZ Corp. Logo" for a company's logo on its welcome page. Good ALT text is crucial to the document's accessibility for the significant portion of users who do not load images; see Use of ALT texts in IMGs for a thorough discussion.

The LONGDESC attribute gives the location of a long description of the image. This attribute should be used to provide a long description of an image where this would be useful. For example, a painting, graph, or corporate logo could be given a description so that blind and other text-only users can develop a mental picture of the image.

The WIDTH and HEIGHT attributes are most useful when they specify the exact dimensions of the image in pixels. This allows image-loading browsers to reserve the proper amount of space for the image and continue to render the rest of the document, thus giving the appearance of a faster-loading page.

Unfortunately, many graphical browsers will use these dimensions when not loading images, which can cause the ALT text to be cut off if the image is small or the ALT text is large. In such cases, authors may wish to leave off the WIDTH and HEIGHT attributes, depending on the importance of the ALT text and the placement of the image on the page (an image towards the end of the document without WIDTH and HEIGHT attributes will generally not noticeably slow the rendering of the page).

Authors can also specify different dimensions for the WIDTH and HEIGHT attributes, in which case browsers should scale the image. Percentages, relative to the horizontal or vertical space available (not relative to the image's natural size) can also be specified, though these are not as widely supported as pixel lengths. Since browsers typically do a poor job of scaling images, authors should avoid using WIDTH and HEIGHT for this purpose as much as possible.

The ALIGN attribute, deprecated in HTML 4.0, specifies the alignment of the image. The values top, middle, and bottom specify the image's position with respect to surrounding content on its left and right.

ALIGN=middle aligns the center of the image with the current baseline. To center the image horizontally on the page, place the image in a centered block, e.g.,

<H1 ALIGN=center><IMG SRC="logo.gif" ALT="Welcome to XYZ Company"></H1>

The other ALIGN values, left and right, specify a floating image; the image is placed at the left or right margin and content flows around it. To place content below the image, use <BR CLEAR=left|right|all> as appropriate.

The vertical-align and float properties of Cascading Style Sheets provide more flexible methods of aligning images.

The BORDER attribute, deprecated in HTML 4.0, specifies the width of the image's border. Specifying BORDER=0 will eliminate the border around a linked image in most browsers, though some allow the user to override this. Authors should only use BORDER=0 if the image would be clearly recognizable as a link, or as a method of de-emphasizing a link. For example:

<A HREF="reference/"><IMG SRC="icon/reference.gif" ALT="" WIDTH=90 HEIGHT=90 BORDER=0>Web Authoring Reference</A>

The deprecated HSPACE and VSPACE attributes allow an author to suggest horizontal gutters and vertical gutters, respectively, around the image. The value must be in pixels and applies to both sides of the image. Style sheets provide more flexibility in specifying the space around images.

The USEMAP attribute is used with client-side image maps to give the location of the map definition. While this value may be a full URI--allowing a single map definition to be applied to multiple pages--Netscape Navigator will only find map definitions in the same file, effectively limiting the USEMAP value to a fragment identifier such as "#map".

The ISMAP attribute is used with server-side image maps. When the ISMAP attribute is included with a linked image and the user clicks the image, the image coordinates clicked are sent to the server, from which a location can be returned. The method of handling the coordinates is server-dependent, but the NCSA server's method is most common.

Server-side image maps are better supported than client-side image maps, but almost all browsers today support both methods. Client-side image maps are generally preferred since they do not require an extra request to the server (and so are faster), and since they allow a usable menu to be provided to text-only users. Using both methods in combination is a good approach, since browsers supporting client-side image maps will use that method while older browsers will use the server-side image map. An example follows:

<A href="http://www.htmlhelp.com/cgi-bin/imagemap/sitemap.map"><IMG SRC="sitemap.gif" ALT="Site Map" ISMAP USEMAP="#map" WIDTH=100 HEIGHT=100></A>

A MAP element named map would have to be included in the same document.

More Information

u IMG in W3C HTML 4.0 Recommendation

u IMG in W3C HTML 3.2 Recommendation

u IMG in HTML 2.0 Standard

u IMG in WDG HTML 3.2 Reference

u IMG in Learning HTML 3.2 by Examples

u Use of ALT texts in IMGs

u Image Use on the Web

u JPEG FAQ

u PNG (Portable Network Graphics) Home Page

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


MAP - Image Map

MAP - Image Map

Syntax <MAP>...</MAP>
Attribute Specifications u NAME=CDATA (name of map)  u common attributes
Contents One or more block-level elements or one or more AREA elements
Contained in Inline elements, block-level elements

The MAP element defines a client-side image map for use with an IMG or OBJECT. MAP's required NAME attribute is used as an anchor for the USEMAP attribute of the IMG or OBJECT. While a MAP element can define image maps embedded in other files, browsers typically only support client-side image maps with the MAP in the same file as the image.

MAP was originally defined to take one or more AREA elements that specified the coordinates of a clickable region on the image. An example follows:

<MAP NAME=mymap>
<AREA href="http://www.htmlhelp.com/reference/" ALT="HTML and CSS Reference" COORDS="5,5,95,195">
<AREA href="http://www.htmlhelp.com/design/" ALT="Design Guide" COORDS="105,5,195,195">
<AREA href="http://www.htmlhelp.com/tools/" ALT="Tools" COORDS="205,5,295,195">
</MAP>
<IMG SRC="sitemap.gif" ALT="Site map" USEMAP="#mymap" WIDTH=300 HEIGHT=200>

HTML 4.0 extends the MAP element to take one or more block-level elements as an alternative to using AREA elements. Combined with the OBJECT element, this allows rich alternative content for those not loading images. However, due to poor and buggy browser support for OBJECT, client-side image maps through the IMG element are more reliable.

When MAP is given within an OBJECT, its contents are not rendered on image-loading browsers. MAP may also be used outside the OBJECT element so that its contents are rendered.

The following example gives two images, one an alternate if the first type of image is not supported. The images share a single image map definition, which is included within the OBJECT element. The MAP element contains a menu of links to be rendered on browsers not loading images.

<OBJECT DATA="sitemap.png" USEMAP="#map" TYPE="image/png" TITLE="Site map" WIDTH=300 HEIGHT=200>
<OBJECT DATA="sitemap.gif" USEMAP="#map" TYPE="image/gif" TITLE="Site map" WIDTH=300 HEIGHT=200>
<MAP NAME=map>
<UL>
<LI><A href="http://www.htmlhelp.com/reference/" COORDS="5,5,95,195">HTML and CSS Reference</A></LI>
<LI><A href="http://www.htmlhelp.com/design/" COORDS="105,5,195,195">Design Guide</A></LI>
<LI><A href="http://www.htmlhelp.com/tools/index.html" COORDS="205,5,295,195">Tools</A></LI>
</UL>
</MAP>
</OBJECT>
</OBJECT>

More Information

u MAP in W3C HTML 4.0 Recommendation

u MAP in W3C HTML 3.2 Recommendation

u MAP in WDG HTML 3.2 Reference

u MAP in Learning HTML 3.2 by Examples

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


HTML 4.0 Common Attributes

HTML 4.0 Common Attributes

A number of attributes in HTML 4.0 are common to most elements. These attributes are divided into core attributes, internationalization attributes, and scripting events.

Core Attributes

ID

The ID attribute uniquely identifies an element within a document. No two elements can have the same ID value in a single document. The attribute's value must begin with a letter in the range A-Z or a-z and may be followed by letters (A-Za-z), digits (0-9), hyphens ("-"), underscores ("_"), colons (":"), and periods (".").

The following example uses the ID attribute to identify each of the first two paragraphs of a document:

<P ID=firstp>My first paragraph.</P>
<P ID=secondp>My second paragaph.</P>

The paragraphs in the example could have style rules associated with them through their ID attributes. The following Cascading Style Sheet defines unique colors for the two paragraphs:

P#firstp {
  color: navy;
  background: transparent
}

P#secondp {
  color: black;
  background: transparent
}

The paragraphs in the initial example could also be used as a target anchor for links:

<P>See <A HREF="#firstp">the opening paragraph</A> for more information.</P>

Note that most browsers do not support the ID attribute for link anchors. For current browsers, authors should use <A NAME>...</A> within the element instead of ID.

Since ID and NAME share the same name space, authors cannot use the same value for an ID attribute and a NAME attribute in the same document. Also note that while NAME may contain entities, the ID attribute value may not.

CLASS

The CLASS attribute specifies the element to be a member of one or more classes. Classes allow authors to define specific kinds of a given element. For example, an author could use <CODE CLASS=Java> when giving Java code and <CODE CLASS=Perl> when giving Perl code.

Unlike with the ID attribute, any number of elements can share the same class. An element may also belong to multiple classes; the CLASS attribute value is a space-separated list of class names.

Note that most current browsers do not support multiple classes. Such browsers typically ignore a CLASS attribute that specifies multiple classes.

The CLASS attribute is particularly useful when combined with style sheets. For example, consider the following navigation bar:

<DIV CLASS=navbar>
<P><A href="http://www.htmlhelp.com/">Home</A> | <A HREF="./">Index</A> | <A href="http://www.htmlhelp.com/search.html">Search</A></P>
<P><A href="http://www.htmlhelp.com/"><IMG SRC="logo.gif" ALT="" TITLE="WDG Logo"></A></P>
</DIV>

This example's use of the CLASS attribute allows style rules to easily be added. The following Cascading Style Sheet suggests a presentation for the preceding example:

.navbar {
  margin-top: 2em;
  padding-top: 1em;
  border-top: solid thin navy
}

.navbar IMG { float: right }

@media print {
  .navbar { display: none }
}

STYLE

The STYLE attribute allows authors to specify style rules inline for a single occurrence of an element. An example follows:

<P>A popular font for on-screen reading is <SPAN STYLE="font-family: Verdana">Verdana</SPAN>.</P>

When the STYLE attribute is used, a default style sheet language must be specified for the document by setting the Content-Style-Type HTTP header to the media type of the style sheet language. The previous example could use the following META element in the document's HEAD:

<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">

In most cases, use of the CLASS or ID attributes is a better choice than using STYLE since ID and CLASS can be selectively applied to different media and since they provide a separation of content and presentation that often simplifies maintenance.

TITLE

The TITLE attribute provides a title for an element and is commonly implemented as a "tooltip" on visual browsers, though many browsers lack support for TITLE. The attribute is most useful with A, LINK, IMG, and OBJECT elements, where it provides a title for the linked or embedded resource. Some examples follow:

u <A HREF="mailto:liam@htmlhelp.com" TITLE="Feedback on HTML 4.0 Reference">liam@htmlhelp.com</A>

u <A HREF="http://www-genome.wi.mit.edu/ftp/pub/software/WWW/cgi_docs.html" TITLE="CGI.pm - a Perl5 CGI Library">CGI.pm</A>

u <LINK REL=Alternate HREF="index.fr.html" HREFLANG=fr LANG=fr TITLE="Version française">

u <OBJECT CLASSID="java:Yahtzee.class" CODETYPE="application/java" WIDTH=400 HEIGHT=250 STANDBY="Ready to play Yahtzee?" TITLE="My Yahtzee Game">
<IMG SRC="yahtzee.gif" ALT="" TITLE="A Yahtzee animation">
Yahtzee is my <EM>favorite</EM> game!
</OBJECT>

TITLE is also helpful with the ABBR and ACRONYM elements to provide the long form of the abbreviation. Examples:

u He weighs 180 <ABBR TITLE=pounds>lbs.</ABBR>

u <ABBR TITLE="Parti Québécois" LANG=fr-CA>PQ</ABBR>

u <ACRONYM TITLE="North Atlantic Treaty Organization">NATO</ACRONYM>

Internationalization Attributes

LANG

The LANG attribute specifies the language of an element's attribute values and its content, including all contained elements that do not specify their own LANG attribute. While the LANG attribute is not widely supported, its use may help search engines index a document by its language while allowing speech synthesizers to use language-dependent pronunciation rules. As well, visual browsers can use the language's proper quotation marks when rendering the Q element.

The attribute value is case-insensitive, and should be specified according to RFC 1766; examples include en for English, en-US for American English, and ja for Japanese. Whitespace is not allowed in the language code.

Use of the LANG attribute also allows authors to easily change the style of text depending on the language. For example, a bilingual document may have one language in italics if rendered visually or a different voice if rendered aurally. The HTML of such a document might be as follows:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"
   "http://www.w3.org/TR/REC-html40/strict.dtd">
<TITLE>Welcome - Bienvenue</TITLE>
<H1>
  <SPAN LANG=en>Welcome</SPAN> -
  <SPAN LANG=fr>Bienvenue</SPAN>
</H1>
<P LANG=en>This paragraph is in English.</P>
<P LANG=fr>Ce paragraphe est en français.</P>
...

A document's primary language may be set using the LANG attribute on the HTML element, or, alternatively, by using the Content-Language HTTP header.

DIR

The DIR attribute specifies the directionality of text--left-to-right (DIR=ltr, the default) or right-to-left (DIR=rtl). Characters in Unicode are assigned a directionality, left-to-right or right-to-left, to allow the text to be rendered properly. For example, while English characters are presented left-to-right, Hebrew characters are presented right-to-left.

Unicode defines a bidirectional algorithm that must be applied whenever a document contains right-to-left characters. While this algorithm usually gives the proper presentation, some situations leave directionally neutral text and require the DIR attribute to specify the base directionality.

Text is often directionally neutral when there are multiple embeddings of content with a different directionality. For example, an English sentence that contains a Hebrew phrase that contains an English quotation would require the DIR attribute to define the directionality of the Hebrew phrase. The Hebrew phrase, including the English quotation, should be contained within a SPAN element with DIR=rtl.

Common Scripting Events

A number of attributes that define client-side scripting events are common to most elements. The attribute value is a script--typically a function call or a few short statements--that is executed when the event occurs. The value may contain entities (e.g., &quot;).

The following example features JavaScript code to handle two events of a submit button, giving the user a reminder in the status bar when the mouse moves over the button and clearing the status bar when the mouse moves away. Note that the attribute values are delimited by single quotes since double quotes are used within them.

<INPUT TYPE=submit ONMOUSEOVER='window.status="Did you fill in all required fields?";' ONMOUSEOUT='window.status="";'>

When an event attribute is used, a default scripting language must be specified for the document by setting the Content-Script-Type HTTP header to the media type of the scripting language. The previous example could use the following META element in the document's HEAD:

<META HTTP-EQUIV="Content-Script-Type" CONTENT="text/javascript">

The common event attributes are device-dependent and largely tailored for the graphical user interface. The available events are as follows:

u ONCLICK, when the mouse button is clicked on an element;

u ONDBLCLICK, when the mouse button is double-clicked on an element;

u ONMOUSEDOWN, when the mouse button is pressed over an element;

u ONMOUSEUP, when the mouse button is released over an element;

u ONMOUSEOVER, when the mouse is moved onto an element;

u ONMOUSEMOVE, when the mouse is moved while over an element;

u ONMOUSEOUT, when the mouse is moved away from an element;

u ONKEYPRESS, when a key is pressed and released over an element;

u ONKEYDOWN, when a key is pressed down over an element;

u ONKEYUP, when a key is released over an element.

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


HTML 4.0 Entities for Symbols and Greek Letters

Entities for Symbols and Greek Letters

The following table gives the character entity reference, decimal character reference, and hexadecimal character reference for symbols and Greek letters. Glyphs of the characters are available at the Unicode Consortium.

Browser support for these entities is generally quite poor, but recent browsers support some of the character entity references and decimal character references.

Note that hexadecimal character references will cause errors with current validators (except the WDG HTML Validator) since these references are defined in a recent revision to the SGML standard that is not yet supported by most validators.

Character		Entity	Decimal	Hex
Latin small f with hook = function = florin		&fnof;	&#402;	&#x192;
Greek capital letter alpha		&Alpha;	&#913;	&#x391;
Greek capital letter beta		&Beta;	&#914;	&#x392;
Greek capital letter gamma		&Gamma;	&#915;	&#x393;
Greek capital letter delta		&Delta;	&#916;	&#x394;
Greek capital letter epsilon		&Epsilon;	&#917;	&#x395;
Greek capital letter zeta		&Zeta;	&#918;	&#x396;
Greek capital letter eta		&Eta;	&#919;	&#x397;
Greek capital letter theta		&Theta;	&#920;	&#x398;
Greek capital letter iota		&Iota;	&#921;	&#x399;
Greek capital letter kappa		&Kappa;	&#922;	&#x39A;
Greek capital letter lambda		&Lambda;	&#923;	&#x39B;
Greek capital letter mu		&Mu;	&#924;	&#x39C;
Greek capital letter nu		&Nu;	&#925;	&#x39D;
Greek capital letter xi		&Xi;	&#926;	&#x39E;
Greek capital letter omicron		&Omicron;	&#927;	&#x39F;
Greek capital letter pi		&Pi;	&#928;	&#x3A0;
Greek capital letter rho		&Rho;	&#929;	&#x3A1;
Greek capital letter sigma		&Sigma;	&#931;	&#x3A3;
Greek capital letter tau		&Tau;	&#932;	&#x3A4;
Greek capital letter upsilon		&Upsilon;	&#933;	&#x3A5;
Greek capital letter phi		&Phi;	&#934;	&#x3A6;
Greek capital letter chi		&Chi;	&#935;	&#x3A7;
Greek capital letter psi		&Psi;	&#936;	&#x3A8;
Greek capital letter omega		&Omega;	&#937;	&#x3A9;
Greek small letter alpha		&alpha;	&#945;	&#x3B1;
Greek small letter beta		&beta;	&#946;	&#x3B2;
Greek small letter gamma		&gamma;	&#947;	&#x3B3;
Greek small letter delta		&delta;	&#948;	&#x3B4;
Greek small letter epsilon		&epsilon;	&#949;	&#x3B5;
Greek small letter zeta		&zeta;	&#950;	&#x3B6;
Greek small letter eta		&eta;	&#951;	&#x3B7;
Greek small letter theta		&theta;	&#952;	&#x3B8;
Greek small letter iota		&iota;	&#953;	&#x3B9;
Greek small letter kappa		&kappa;	&#954;	&#x3BA;
Greek small letter lambda		&lambda;	&#955;	&#x3BB;
Greek small letter mu		&mu;	&#956;	&#x3BC;
Greek small letter nu		&nu;	&#957;	&#x3BD;
Greek small letter xi		&xi;	&#958;	&#x3BE;
Greek small letter omicron		&omicron;	&#959;	&#x3BF;
Greek small letter pi		&pi;	&#960;	&#x3C0;
Greek small letter rho		&rho;	&#961;	&#x3C1;
Greek small letter final sigma		&sigmaf;	&#962;	&#x3C2;
Greek small letter sigma		&sigma;	&#963;	&#x3C3;
Greek small letter tau		&tau;	&#964;	&#x3C4;
Greek small letter upsilon		&upsilon;	&#965;	&#x3C5;
Greek small letter phi		&phi;	&#966;	&#x3C6;
Greek small letter chi		&chi;	&#967;	&#x3C7;
Greek small letter psi		&psi;	&#968;	&#x3C8;
Greek small letter omega		&omega;	&#969;	&#x3C9;
Greek small letter theta symbol		&thetasym;	&#977;	&#x3D1;
Greek upsilon with hook symbol		&upsih;	&#978;	&#x3D2;
Greek pi symbol		&piv;	&#982;	&#x3D6;
bullet = black small circle		&bull;	&#8226;	&#x2022;
horizontal ellipsis = three dot leader		&hellip;	&#8230;	&#x2026;
prime = minutes = feet		&prime;	&#8242;	&#x2032;
double prime = seconds = inches		&Prime;	&#8243;	&#x2033;
overline = spacing overscore		&oline;	&#8254;	&#x203E;
fraction slash		&frasl;	&#8260;	&#x2044;
script capital P = power set = Weierstrass p		&weierp;	&#8472;	&#x2118;
blackletter capital I = imaginary part		&image;	&#8465;	&#x2111;
blackletter capital R = real part symbol		&real;	&#8476;	&#x211C;
trade mark sign		&trade;	&#8482;	&#x2122;
alef symbol = first transfinite cardinal		&alefsym;	&#8501;	&#x2135;
leftwards arrow		&larr;	&#8592;	&#x2190;
upwards arrow		&uarr;	&#8593;	&#x2191;
rightwards arrow		&rarr;	&#8594;	&#x2192;
downwards arrow		&darr;	&#8595;	&#x2193;
left right arrow		&harr;	&#8596;	&#x2194;
downwards arrow with corner leftwards = carriage return		&crarr;	&#8629;	&#x21B5;
leftwards double arrow		&lArr;	&#8656;	&#x21D0;
upwards double arrow		&uArr;	&#8657;	&#x21D1;
rightwards double arrow		&rArr;	&#8658;	&#x21D2;
downwards double arrow		&dArr;	&#8659;	&#x21D3;
left right double arrow		&hArr;	&#8660;	&#x21D4;
for all		&forall;	&#8704;	&#x2200;
partial differential		&part;	&#8706;	&#x2202;
there exists		&exist;	&#8707;	&#x2203;
empty set = null set = diameter		&empty;	&#8709;	&#x2205;
nabla = backward difference		&nabla;	&#8711;	&#x2207;
element of		&isin;	&#8712;	&#x2208;
not an element of		&notin;	&#8713;	&#x2209;
contains as member		&ni;	&#8715;	&#x220B;
n-ary product = product sign		&prod;	&#8719;	&#x220F;
n-ary sumation		&sum;	&#8721;	&#x2211;
minus sign		&minus;	&#8722;	&#x2212;
asterisk operator		&lowast;	&#8727;	&#x2217;
square root = radical sign		&radic;	&#8730;	&#x221A;
proportional to		&prop;	&#8733;	&#x221D;
infinity		&infin;	&#8734;	&#x221E;
angle		&ang;	&#8736;	&#x2220;
logical and = wedge		&and;	&#8743;	&#x2227;
logical or = vee		&or;	&#8744;	&#x2228;
intersection = cap		&cap;	&#8745;	&#x2229;
union = cup		&cup;	&#8746;	&#x222A;
integral		&int;	&#8747;	&#x222B;
therefore		&there4;	&#8756;	&#x2234;
tilde operator = varies with = similar to		&sim;	&#8764;	&#x223C;
approximately equal to		&cong;	&#8773;	&#x2245;
almost equal to = asymptotic to		&asymp;	&#8776;	&#x2248;
not equal to		&ne;	&#8800;	&#x2260;
identical to		&equiv;	&#8801;	&#x2261;
less-than or equal to		&le;	&#8804;	&#x2264;
greater-than or equal to		&ge;	&#8805;	&#x2265;
subset of		&sub;	&#8834;	&#x2282;
superset of		&sup;	&#8835;	&#x2283;
not a subset of		&nsub;	&#8836;	&#x2284;
subset of or equal to		&sube;	&#8838;	&#x2286;
superset of or equal to		&supe;	&#8839;	&#x2287;
circled plus = direct sum		&oplus;	&#8853;	&#x2295;
circled times = vector product		&otimes;	&#8855;	&#x2297;
up tack = orthogonal to = perpendicular		&perp;	&#8869;	&#x22A5;
dot operator		&sdot;	&#8901;	&#x22C5;
left ceiling = APL upstile		&lceil;	&#8968;	&#x2308;
right ceiling		&rceil;	&#8969;	&#x2309;
left floor = APL downstile		&lfloor;	&#8970;	&#x230A;
right floor		&rfloor;	&#8971;	&#x230B;
left-pointing angle bracket = bra		&lang;	&#9001;	&#x2329;
right-pointing angle bracket = ket		&rang;	&#9002;	&#x232A;
lozenge		&loz;	&#9674;	&#x25CA;
black spade suit		&spades;	&#9824;	&#x2660;
black club suit = shamrock		&clubs;	&#9827;	&#x2663;
black heart suit = valentine		&hearts;	&#9829;	&#x2665;
black diamond suit		&diams;	&#9830;	&#x2666;

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Latin-1 Characters ~ Other Special Characters

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


HTML 4.0 Special Entities

Special Entities

The following table gives the character entity reference, decimal character reference, and hexadecimal character reference for markup-significant and internationalization characters. Glyphs of the characters are available at the Unicode Consortium.

With the exception of HTML 2.0's &quot;, &amp;, &lt;, and &gt;, browser support for these entities is generally quite poor, but recent browsers support some of the character entity references and decimal character references.

Note that hexadecimal character references will cause errors with current validators (except the WDG HTML Validator) since these references are defined in a recent revision to the SGML standard that is not yet supported by most validators.

Character		Entity	Decimal	Hex
quotation mark = APL quote		&quot;	&#34;	&#x22;
ampersand		&amp;	&#38;	&#x26;
less-than sign		&lt;	&#60;	&#x3C;
greater-than sign		&gt;	&#62;	&#x3E;
Latin capital ligature OE		&OElig;	&#338;	&#x152;
Latin small ligature oe		&oelig;	&#339;	&#x153;
Latin capital letter S with caron		&Scaron;	&#352;	&#x160;
Latin small letter s with caron		&scaron;	&#353;	&#x161;
Latin capital letter Y with diaeresis		&Yuml;	&#376;	&#x178;
modifier letter circumflex accent		&circ;	&#710;	&#x2C6;
small tilde		&tilde;	&#732;	&#x2DC;
en space		&ensp;	&#8194;	&#x2002;
em space		&emsp;	&#8195;	&#x2003;
thin space		&thinsp;	&#8201;	&#x2009;
zero width non-joiner		&zwnj;	&#8204;	&#x200C;
zero width joiner		&zwj;	&#8205;	&#x200D;
left-to-right mark		&lrm;	&#8206;	&#x200E;
right-to-left mark		&rlm;	&#8207;	&#x200F;
en dash		&ndash;	&#8211;	&#x2013;
em dash		&mdash;	&#8212;	&#x2014;
left single quotation mark		&lsquo;	&#8216;	&#x2018;
right single quotation mark		&rsquo;	&#8217;	&#x2019;
single low-9 quotation mark		&sbquo;	&#8218;	&#x201A;
left double quotation mark		&ldquo;	&#8220;	&#x201C;
right double quotation mark		&rdquo;	&#8221;	&#x201D;
double low-9 quotation mark		&bdquo;	&#8222;	&#x201E;
dagger		&dagger;	&#8224;	&#x2020;
double dagger		&Dagger;	&#8225;	&#x2021;
per mille sign		&permil;	&#8240;	&#x2030;
single left-pointing angle quotation mark		&lsaquo;	&#8249;	&#x2039;
single right-pointing angle quotation mark		&rsaquo;	&#8250;	&#x203A;
euro sign		&euro;	&#8364;	&#x20AC;

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Latin-1 Characters ~ Symbols and Greek Letters

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


LINK - Document Relationship

LINK - Document Relationship

Syntax <LINK>
Attribute Specifications u REL=LinkTypes (relationship to link)  u REV=LinkTypes (relationship from link)  u HREF=URI (hypertext reference)  u TYPE=ContentType (content-type of link)  u TARGET=FrameTarget (frame to render link in)  u MEDIA=MediaDesc (media appropriate for link)  u HREFLANG=LanguageCode (language of link)  u CHARSET=Charset (character encoding of link)  u common attributes
Contents Empty
Contained in HEAD

The LINK element defines document relationships. Any number of LINK elements may be contained in the HEAD of a document. Many browsers lack support for LINK, so authors should not depend on the browser making the links available to the user.

The REL and REV attributes define the nature of the relationship between the documents and the linked resource. REL defines a link relationship from the current document to the linked resource while REV defines a relationship in the opposite direction. For example,

<LINK REL=Glossary HREF="foo.html">

indicates that foo.html is a glossary for the current document while

<LINK REV=Subsection HREF="bar.html">

indicates that the current document is a subsection of bar.html. The value of the REL and REV attributes is a space-separated list of link types.

Commonly used relationships include the next or previous document in a sequence, the starting page in a collection of documents, a document with copyright information, and information about the author. A document could define these relationships as follows:

<LINK REL=Prev HREF="base.html" TITLE="BASE - Document Base URI">
<LINK REL=Next HREF="meta.html" TITLE="META - Metadata">
<LINK REL=Start href="../index.html" TITLE="HTML 4.0 Reference">
<LINK REL=Copyright href="http://www.htmlhelp.com/copyright.html" TITLE="Copyright Notice">
<LINK REV=Made HREF="mailto:liam@htmlhelp.com" TITLE="HTML 4.0 Reference Feedback">

While the value of REL and REV is case-insensitive, the Lynx browser renders the relationship exactly as given by the author. Authors should therefore be consistent in their case, and may wish to capitalize the first letter while using lowercase for the rest.

Authors can also use the LINK element to apply an external style sheet. REL=StyleSheet specifies a persistent or preferred style while REL="Alternate StyleSheet" defines an alternate style. A persistent style is one that is always applied when style sheets are enabled. The absence of the TITLE attribute indicates a persistent style.

A preferred style is one that is automatically applied. The combination of REL=StyleSheet and a TITLE attribute specifies a preferred style. Authors cannot specify more than one preferred style.

An alternate style is indicated by REL="Alternate StyleSheet". The user could choose to replace the preferred style sheet with an alternate one, though current browsers generally lack the ability to choose alternate styles.

A single style may also be given through multiple style sheets:

<LINK REL=StyleSheet HREF="basics.css" TITLE="Contemporary" TYPE="text/css">
<LINK REL=StyleSheet HREF="tables.css" TITLE="Contemporary" TYPE="text/css">
<LINK REL=StyleSheet HREF="forms.css" TITLE="Contemporary" TYPE="text/css">

In this example, three style sheets are combined into one "Contemporary" style that is applied as a preferred style sheet. To combine multiple style sheets into a single style, each style sheet's LINK must use the same TITLE.

LINK's MEDIA attribute specifies the media for which the linked resource is designed. With REL=StyleSheet, this allows authors to restrict a style sheet to certain output devices, such as printers or aural browsers. The attribute's value is a comma-separated list of media descriptors. The following media descriptors are defined in HTML 4.0 and are case-sensitive:

u screen (the default), for non-paged computer screens;

u tty, for fixed-pitch character grid displays (such as the display used by Lynx);

u tv, for television-type devices with low resolution and limited scrollability;

u projection, for projectors;

u handheld, for handheld devices (characterized by a small, monochrome display and limited bandwidth);

u print, for output to a printer;

u braille, for braille tactile feedback devices;

u aural, for speech synthesizers;

u all, for all devices.

Netscape Navigator 4.x incorrectly ignores any style sheet linked with a MEDIA value other than screen. For example, MEDIA="screen, projection" will cause the style sheet to be ignored by Navigator 4.x, even if the presentation device is a computer screen. Navigator 4.x also ignores style sheets declared with MEDIA=all. Most other browsers ignore the MEDIA attribute.

The optional HREFLANG and CHARSET attributes of LINK give the language and character encoding, respectively, of the link. The language should be specified according to RFC 1766; examples include en for English, en-US for American English, and ja for Japanese. Examples of character encodings include ISO-8859-1, SHIFT_JIS, and UTF-8.

The Alternate link relationship defines an alternate version of the document. Translations of a page can be identified by using REL=Alternate along with the HREFLANG attribute. Versions of the page tailored for specific media can be provided by combining REL=Alternate with the MEDIA attribute. Some examples follow:

<LINK REL=Alternate HREF="index.fr.html" HREFLANG=fr LANG=fr TITLE="Version française">
<LINK REL=Alternate HREF="index.ja.html" HREFLANG=ja CHARSET="SHIFT_JIS" TITLE="Japanese version">
<LINK REL=Alternate href="http://www.htmlhelp.com/distribution/html40.pdf" TYPE="application/pdf" MEDIA=print TITLE="PDF version">

Note that the LANG and DIR attributes apply to the text of the TITLE attribute, not to the content of the link.

The TARGET attribute is used with frames to specify in which frame the link should be rendered. If no frame with such a name exists, the link is rendered in a new window unless overridden by the user. Special frame names begin with an underscore:

u _blank renders the link in a new, unnamed window

u _self renders the link in the current frame (useful for overriding a BASE TARGET)

u _parent renders the link in the immediate FRAMESET parent

u _top renders the link in the full, unframed window

More Information

u LINK in W3C HTML 4.0 Recommendation

u LINK in W3C HTML 3.2 Recommendation

u LINK in HTML 2.0 Standard

u LINK in WDG HTML 3.2 Reference

u LINK in Learning HTML 3.2 by Examples

u Metadata at W3C

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


STYLE - Embedded Style Sheet

STYLE - Embedded Style Sheet

Syntax <STYLE>...</STYLE>
Attribute Specifications u TYPE=ContentType (content-type of style language)  u MEDIA=MediaDesc (media to apply style to)  u TITLE=Text (title of style sheet)  u internationalization attributes (for the TITLE)
Contents An embedded style sheet
Contained in HEAD

The STYLE element embeds a style sheet in the document. Any number of STYLE elements may be contained in the HEAD of a document.

The required TYPE attribute of STYLE is used to specify the Internet media type of the style language. For Cascading Style Sheets, the TYPE attribute value should be text/css.

The optional TITLE attribute gives a title for the style sheet. Without a TITLE attribute, the style sheet is always applied when style sheets are enabled. With a TITLE attribute, the style sheet is automatically applied but the user may choose to disable the style sheet while keeping or enabling other style sheets. Style sheets with the same title are considered to be the same style sheet.

Most current browsers ignore the TITLE attribute on style sheets and do not allow the user to selectively enable or disable individual style sheets.

The MEDIA attribute specifies the media on which the style sheet should be applied. This allows authors to restrict a style sheet to certain output devices, such as printers or aural browsers. The attribute's value is a comma-separated list of media descriptors. The following media descriptors are defined in HTML 4.0 and are case-sensitive:

u screen (the default), for non-paged computer screens;

u tty, for fixed-pitch character grid displays (such as the display used by Lynx);

u tv, for television-type devices with low resolution and limited scrollability;

u projection, for projectors;

u handheld, for handheld devices (characterized by a small, monochrome display and limited bandwidth);

u print, for output to a printer;

u braille, for braille tactile feedback devices;

u aural, for speech synthesizers;

u all, for all devices.

Netscape Navigator 4.x incorrectly ignores any STYLE element with a MEDIA value other than screen. For example, MEDIA="screen, projection" will cause the style sheet to be ignored by Navigator 4.x, even if the presentation device is a computer screen. Navigator 4.x also ignores style sheets declared with MEDIA=all. Most other browsers ignore the MEDIA attribute.

An example of an embedded style sheet follows:

<STYLE TYPE="text/css" MEDIA=screen>
<!--
  BODY  { background: url(foo.gif) red; color: black }
  P EM  { background: yellow; color: black }
  .note { margin-left: 5em; margin-right: 5em }
-->
</STYLE>

Pre-HTML 3.2 browsers, unaware of the STYLE element, would normally show its contents as if they were part of the BODY, thus making the style sheet visible to the user. To prevent this, style languages like CSS allow the style sheet to be contained within an SGML comment (<!-- comment -->), as in the preceding example.

An embedded style sheet should be used when a single document has a unique style. If the same style sheet is used in multiple documents, then an external style sheet would be more appropriate.

More Information

u STYLE in W3C HTML 4.0 Recommendation

u STYLE in W3C HTML 3.2 Recommendation

u STYLE in WDG HTML 3.2 Reference

u STYLE in Learning HTML 3.2 by Examples

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


SCRIPT - Client-side Script

SCRIPT - Client-side Script

Syntax <SCRIPT>...</SCRIPT>
Attribute Specifications u TYPE=ContentType (content-type of scripting language)  u LANGUAGE=CDATA (scripting language name)  u SRC=URI (external script location)  u CHARSET=Charset (character encoding of external script)  u DEFER (script execution may wait)
Contents An embedded script
Contained in HEAD, inline elements, block-level elements

The SCRIPT element includes a client-side script in the document. Client-side scripts allow greater interactivity in a document by responding to user events. For example, a script could be used to check the user's form input prior to submission to provide immediate notice of any errors by the user.

Note that not all browsers support client-side scripting, and supporting browsers allow the user to disable scripting, so authors should avoid dependence on client-side scripting wherever possible. The NOSCRIPT element can be used to provide content for browsers that do not support client-side scripting or have it disabled. In the case of form validation, any error checking done by the client-side script should be repeated by the CGI script or Java servlet that handles the submission at the server.

Also note that different browsers support different variants of scripting languages with different bugs. Authors are encouraged to check their scripts on as many browsers as possible. Browsers that support client-side scripting include Netscape Navigator 2.0 and up, Microsoft Internet Explorer 3.0 and up, and Opera 3.0 and up.

The required TYPE attribute of SCRIPT specifies the media type of the scripting language, e.g., text/javascript. However, most browsers only support the deprecated LANGUAGE attribute, which specifies the language name. Examples of supported LANGUAGE values include JavaScript, JavaScript1.1, and VBScript. The values are not case sensitive.

Browsers will ignore scripts with LANGUAGE values that they do not support. For example, Netscape Navigator 3.0 will execute scripts with LANGUAGE="JavaScript" or LANGUAGE="JavaScript1.1" but will ignore scripts with LANGUAGE="JavaScript1.2" or LANGUAGE="VBScript".

In the absence of the LANGUAGE attribute, browsers typically assume that the language is JavaScript 1.0. As there is no established convention for indicating the version of JavaScript via the TYPE attribute, we recommend that authors continue to use LANGUAGE to specify the language and version where it differs from JavaScript 1.0.

An embedded script is given as the content of the SCRIPT element. The SRC attribute allows authors to reuse code by specifying an external script. The optional CHARSET attribute gives the character encoding of the external script (typically ISO-8859-1). If the browser is unable to fetch the external script it will execute any embedded script; otherwise it will ignore the embedded script. An example follows:

<SCRIPT TYPE="text/javascript" SRC="foo.js" CHARSET="ISO-8859-1">
<!--
  // embedded script, only executed if foo.js is unavailable
// -->
</SCRIPT>

Netscape Navigator requires that external scripts be served with a Content-Type of application/x-javascript.

The DEFER attribute indicates that the browser may wait to parse the script until the rest of the document has been rendered. Scripts that use DEFER must not generate any document content, and should not be required to respond to user events (e.g., form submission) that may occur while the document is loading. The DEFER attribute can be useful for delaying scripts that pre-load images or harass the user with scrolling messages in the status bar, though current browsers do not generally support this attribute.

The SCRIPT element may occur any number of times in the document HEAD or BODY. Typically the SCRIPT element is used in the HEAD unless it generates BODY content.

Pre-HTML 3.2 browsers, unaware of the SCRIPT element, will treat the content of SCRIPT as normal HTML. To make these browsers ignore the SCRIPT's content, scripting languages generally allow SGML comments to be used around an embedded script. For example:

<SCRIPT TYPE="text/javascript">
<!-- comment to end of line
  document.write("foo");
// comment to end of line -->
</SCRIPT>

Note that "-->" is contained within a JavaScript single-line comment (started with two slashes).

Technically, the first occurrence of "</" followed by any letter is considered the end tag for the SCRIPT element. While browsers are forgiving in this, authors should avoid using strings such as "</P>" in their embedded scripts. JavaScript allows authors to use a backslash to avoid ending the SCRIPT element prematurely, e.g., document.write("<\/P>").

More Information

u SCRIPT in W3C HTML 4.0 Recommendation

u SCRIPT in W3C HTML 3.2 Recommendation

u SCRIPT in WDG HTML 3.2 Reference

u SCRIPT in Learning HTML 3.2 by Examples

u JavaScript Guide

u Embedding JavaScript in HTML

u JavaScript Reference

u JScript Web Page

u VBScript Web Page

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


HTML 4.0 Frames

Frames

Frames allow an author to display multiple documents in a single window that is divided into rectangular subspaces called frames. Visual browsers allow these frames to be scrolled independently of each other, and links can be loaded in a frame without changing the content of other frames.

The HTML 4.0 frames model has significant flaws that make frames hated by many users. Frames should only be used with great care; see the Guide to frames usage for some guidelines on suitable use of frames.

In a Frameset document, the outermost FRAMESET element takes the place of BODY and immediately follows the HEAD. Contained within the FRAMESET element are FRAME elements that define each frame, other FRAMESET elements for complex layouts, and a NOFRAMES element to provide alternate content for browsers with frames disabled or not supported.

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


P - Paragraph

P - Paragraph

Syntax <P>...</P>
Attribute Specifications u ALIGN=[ left | center | right | justify ] (horizontal alignment)  u common attributes
Contents Inline elements
Contained in ADDRESS, APPLET, BLOCKQUOTE, BODY, BUTTON, CENTER, DEL, DD, DIV, FIELDSET, FORM, IFRAME, INS, LI, MAP, NOFRAMES, NOSCRIPT, OBJECT, TD, TH

The P element defines a paragraph. The closing tag for P is optional, but its use prevents common browser bugs with style sheets. Note that P cannot contain block-level elements such as TABLE and ADDRESS.

The deprecated ALIGN attribute suggests the horizontal alignment for the content of the paragraph on visual browsers. Possible values are left, right, center, and justify. Style sheets provide greater flexibility in suggesting paragraph alignment.

HTML does not specify a presentation for the P element. Visual browsers commonly use block paragraphs with no first-line indent and separated by a blank line, but some browsers allow the user to specify a different presentation. An author can suggest paragraph indentation and spacing using style sheets. The following CSS ruleset suggests a possible presentation for paragraphs:

P { margin-top: 0; text-indent: 5% }

More Information

u P in W3C HTML 4.0 Recommendation

u P in W3C HTML 3.2 Recommendation

u P in HTML 2.0 Standard

u P in WDG HTML 3.2 Reference

u P in Learning HTML 3.2 by Examples

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


EM - Emphasis

EM - Emphasis

Syntax <EM>...</EM>
Attribute Specifications u common attributes
Contents Inline elements
Contained in Inline elements, block-level elements

The EM element gives emphasis to its contents. Visual browsers typically render EM as italic text, but authors can suggest a rendering using style sheets. Since EM is a structural element, it carries meaning, making it preferable to font style elements such as I when emphasis is the intended meaning.

For strong emphasis, use the STRONG element.

More Information

u EM in W3C HTML 4.0 Recommendation

u EM in W3C HTML 3.2 Recommendation

u EM in HTML 2.0 Standard

u EM in WDG HTML 3.2 Reference

u EM in Learning HTML 3.2 by Examples

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


LI - List Item

LI - List Item

Syntax <LI>...</LI>
Attribute Specifications u TYPE=[ disc | square | circle | 1 | a | A | i | I ] (style of list item marker)  u VALUE=Number (number in sequence)  u common attributes
Contents Inline elements, block-level elements (except for LIs used within DIR and MENU, which do not allow block-level elements)
Contained in OL, UL, DIR, MENU

The LI element defines a list item. The element must be contained within DIR, MENU, OL or UL.

Unless used with the deprecated MENU or DIR elements, LI may contain block-level elements, including H2, TABLE, UL, and OL. This allows OL and UL to be nested, as in the following example:

<UL>
  <LI>
    <H2>HTML Document Type Definitions</H2>
    <UL>
      <LI><A HREF="html.dtd">HTML 2.0</A></LI>
      <LI><A HREF="HTML32.dtd">HTML 3.2</A></LI>
      <LI><A HREF="strict.dtd">HTML 4.0 Strict</A></LI>
    </UL>
  </LI>
  <LI>
    <H2>SGML Character Entity References</H2>
    <UL>
      <LI><A HREF="HTMLlat1.ent">Latin-1 Entities</A></LI>
      <LI><A HREF="HTMLsymbol.ent">Symbols and Greek Letters</A></LI>
      <LI><A HREF="HTMLspecial.ent">Other Special Characters</A></LI>
    </UL>
  </LI>
</UL>

When used with MENU and DIR, LI may not contain block-level elements, and lists cannot be nested.

The deprecated TYPE attribute of LI suggests the rendering of the list item marker. Possible values are as follows:

u Case-insensitive values for LI within a UL, DIR, or MENU:

u disc (a filled-in circle)

u square (a square outline)

u circle (a circle outline)

u Case-sensitive values for LI within an OL:

u 1 (decimal numbers: 1, 2, 3, 4, 5, ...)

u a (lowercase alphabetic: a, b, c, d, e, ...)

u A (uppercase alphabetic: A, B, C, D, E, ...)

u i (lowercase Roman numerals: i, ii, iii, iv, v, ...)

u I (uppercase Roman numerals: I, II, III, IV, V, ...)

Style sheets provide greater flexibility in suggesting list item styles. The list-style property of CSS includes the added abilities to suppress list item markers, use images as markers, and more.

LI's VALUE attribute specifies the number of the list item when used with an OL. The number must be given as an integer, though the list item marker may be rendered in another form (for example, as a Roman numeral). Any LI element following in the same list will take its default sequence number based on the first preceding VALUE attribute. VALUE is deprecated in HTML 4.0, but no substitute currently exists in CSS.

More Information

u LI in W3C HTML 4.0 Recommendation

u LI in W3C HTML 3.2 Recommendation

u LI in HTML 2.0 Standard

u LI in WDG HTML 3.2 Reference

u LI in Learning HTML 3.2 by Examples

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


BR - Line Break

BR - Line Break

Syntax <BR>
Attribute Specifications u CLEAR=[ left | all | right | none ] (clear floating objects)  u core attributes
Contents Empty
Contained in Inline elements, block-level elements

The BR element forces a break in the current line of text. BR can be useful in formatting addresses within the ADDRESS element, but it is often misused to break lines of text in a paragraph or table cell when it looks "nice" to the author. This usually results in an awkward presentation when viewed with a font size other than that used by the author.

The CLEAR attribute of BR is used to move below floating objects (typically images or tables). In the following example, the second paragraph should be rendered below the floating image:

<P><IMG SRC="toronto.jpg" ALIGN=left ALT="" TITLE="Toronto's CN Tower">Toronto is the largest city in Canada and the fourth largest in North America.</P>
<BR CLEAR=left>
<P>The city is highly multicultural, with over 80 ethnic communities from Africa, Asia, and Europe...

Style sheets provide more flexibility in controlling text flow around objects and eliminate the need to use BR for this purpose since CSS1's clear property can be applied to any element (such as the second paragraph in the preceding example).

More Information

u BR in W3C HTML 4.0 Recommendation

u BR in W3C HTML 3.2 Recommendation

u BR in HTML 2.0 Standard

u BR in WDG HTML 3.2 Reference

u BR in Learning HTML 3.2 by Examples

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


DOCTYPE - Document Type Declaration

DOCTYPE - Document Type Declaration

Each HTML document must begin with a document type declaration that declares which version of HTML the document adheres to. HTML 4.0 comes in three flavors, each with a different DOCTYPE:

HTML 4.0 Strict

HTML 4.0 Strict is a trimmed down version of HTML 4.0 that emphasizes structure over presentation. Deprecated elements and attributes (including most presentational attributes), frames, and link targets are not allowed in HTML 4.0 Strict. By writing to HTML 4.0 Strict authors can achieve accessible, structurally rich documents that easily adapt to style sheets and different browsing situations. However, since many browsers lack full support for style sheets, HTML 4.0 Strict documents may look bland on common visual browsers such as Netscape Navigator 3.x.

The document type declaration for HTML 4.0 Strict is

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"
        "http://www.w3.org/TR/REC-html40/strict.dtd">

HTML 4.0 Transitional

HTML 4.0 Transitional includes all elements and attributes of HTML 4.0 Strict but adds presentational attributes, deprecated elements, and link targets. HTML 4.0 Transitional recognizes the relatively poor browser support for style sheets, allowing many HTML presentation features to be used as a transition towards HTML 4.0 Strict.

The document type declaration for HTML 4.0 Transitional is

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
        "http://www.w3.org/TR/REC-html40/loose.dtd">

HTML 4.0 Frameset

HTML 4.0 Frameset is a variant of HTML 4.0 Transitional for documents that use frames. The FRAMESET element replaces the BODY in a Frameset document.

The document type declaration for HTML 4.0 Frameset is

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN"
        "http://www.w3.org/TR/REC-html40/frameset.dtd">

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


HTML - HTML Document

HTML - HTML Document

Syntax <HTML>...</HTML>
Attribute Specifications u VERSION=CDATA (HTML version)  u internationalization attributes
Contents u In HTML 4.0 Strict and Transitional: HEAD followed by BODY  u In HTML 4.0 Frameset: HEAD followed by FRAMESET
Contained in Not applicable--HTML is a top-level element

The HTML element contains the HTML document, made up of the HEAD followed by the BODY, except in Frameset documents where the FRAMESET element replaces the BODY. The start and end tags of the HTML element are both optional.

The LANG attribute is typically set on the HTML element to specify the base language of the document. The language should be specified according to RFC 1766; examples include en for English, en-US for American English, and ja for Japanese.

The deprecated VERSION attribute specifies the Document Type Definition (DTD) that describes the document. This attribute should not be used since the DOCTYPE declaration makes it redundant.

More Information

u HTML in W3C HTML 4.0 Recommendation

u HTML in W3C HTML 3.2 Recommendation

u HTML in HTML 2.0 Standard

u HTML in WDG HTML 3.2 Reference

u HTML in Learning HTML 3.2 by Examples

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


HEAD - Document Head

HEAD - Document Head

Syntax <HEAD>...</HEAD>
Attribute Specifications u PROFILE=URI (dictionary of meta info)  u internationalization attributes
Contents Exactly one TITLE element, optional BASE and ISINDEX elements, and zero or more SCRIPT, STYLE, META, LINK, or OBJECT elements
Contained in HTML

The HEAD element contains header information about the document, such as its title, keywords, description, and style sheet. HEAD is required in all documents, but its start and end tags are always optional. The HEAD element is followed by the BODY in HTML 4.0 Strict and Transitional documents; in HTML 4.0 Frameset documents, the HEAD is followed by a FRAMESET element.

Content in the HEAD is generally not rendered, with the exception of the required TITLE element. If the </HEAD> end tag is omitted, the first BODY or FRAMESET element infers the end of the HEAD.

The optional PROFILE attribute of HEAD gives the location of a metadata profile. A profile defines properties that may be used by META and LINK elements within the HEAD. There is no prescribed format for profiles.

Work is currently underway on improving the use of metadata on the Web. See the W3C's Metadata and Resource Description area for the latest information.

More Information

u HEAD in W3C HTML 4.0 Recommendation

u HEAD in W3C HTML 3.2 Recommendation

u HEAD in HTML 2.0 Standard

u HEAD in WDG HTML 3.2 Reference

u HEAD in Learning HTML 3.2 by Examples

u Metadata at W3C

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


BODY - Document Body

BODY - Document Body

Syntax <BODY>...</BODY>
Attribute Specifications u BACKGROUND=URI (background image for document)  u BGCOLOR=Color (background color for document)  u TEXT=Color (text color for document)  u LINK=Color (link color for document)  u VLINK=Color (visited link color for document)  u ALINK=Color (active link color for document)  u ONLOAD=Script (document has been loaded)  u ONUNLOAD=Script (document has been exited)  u common attributes
Contents u In HTML 4.0 Strict: one or more block-level elements or SCRIPT, INS, DEL  u In HTML 4.0 Transitional: inline elements, block-level elements, INS, DEL
Contained in u In HTML 4.0 Strict or Transitional: HTML  u In HTML 4.0 Frameset: NOFRAMES
The BODY element contains the document body. BODY is required in non-frames documents, but its start and end tags are always optional. In frames documents, BODY must be contained within the NOFRAMES element, if NOFRAMES is used.

The BODY element contains the document's content. The content should be contained within block-level elements or SCRIPT elements, though HTML 4.0 Transitional also allows inline elements directly within BODY.

BODY takes a number of attributes for specifying the background and colors of the document on visual browsers. These attributes are deprecated in HTML 4.0 in favor of style sheets, which provide greater flexibility in suggesting the presentation of a document. BGCOLOR suggests a background color, TEXT suggests a text color, LINK suggests a link color, VLINK suggests a visited link color, and ACTIVE suggests an active link color (when the link is selected). If one of these attributes is given, then all of them should be included to ensure that the user's chosen colors do not interfere with those suggested in the <BODY> tag. Authors should not rely on the specified colors being used since browsers allow these colors to be overridden by the user.

The BACKGROUND attribute suggests a background image for tiling on the document canvas. To help ensure a readable document, the BGCOLOR, TEXT, LINK, VLINK, and ALINK attributes should always be included when BACKGROUND is given. The BGCOLOR will be used for those not loading images.

Style sheets allow more flexibility in suggesting a background image, including the ability to specify the position of the image, how the image is tiled, and whether the image should scroll with the document.

In addition to the core events common to most elements, BODY accepts the following event attributes for client-side scripting:

u ONLOAD, when the document has been loaded;

u ONUNLOAD, when the document is exited.

More Information

u BODY in W3C HTML 4.0 Recommendation

u BODY in W3C HTML 3.2 Recommendation

u BODY in HTML 2.0 Standard

u BODY in WDG HTML 3.2 Reference

u BODY in Learning HTML 3.2 by Examples

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


HTML 4.0 Block-level Elements

HTML 4.0 Block-Level Elements

Most HTML 4.0 elements permitted within the BODY are classified as either block-level elements or inline elements. Block-level elements typically contain inline elements and other block-level elements. When rendered visually, block-level elements usually begin on a new line.

The following are defined as block-level elements in HTML 4.0:

u ADDRESS - Address

u BLOCKQUOTE - Block quotation

u CENTER - Centered block

u DIR - Directory list

u DIV - Generic block-level container

u DL - Definition list

u FIELDSET - Form control group

u FORM - Interactive form

u H1 - Level-one heading

u H2 - Level-two heading

u H3 - Level-three heading

u H4 - Level-four heading

u H5 - Level-five heading

u H6 - Level-six heading

u HR - Horizontal rule

u ISINDEX - Input prompt

u MENU - Menu list

u NOFRAMES - Frames alternate content

u NOSCRIPT - Alternate script content

u OL - Ordered list

u P - Paragraph

u PRE - Preformatted text

u TABLE - Table

u UL - Unordered list

The following elements may also be considered block-level elements since they may contain block-level elements:

u DD - Definition description

u DT - Definition term

u FRAMESET - Frameset

u LI - List item

u TBODY - Table body

u TD - Table data cell

u TFOOT - Table foot

u TH - Table header cell

u THEAD - Table head

u TR - Table row

The following elements may be used as either block-level elements or inline elements. If used as inline elements (e.g., within another inline element or a P), these elements should not contain any block-level elements.

u APPLET - Java applet

u BUTTON - Button

u DEL - Deleted text

u IFRAME - Inline frame

u INS - Inserted text

u MAP - Image map

u OBJECT - Object

u SCRIPT - Client-side script

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


HTML 4.0 Inline Elements

HTML 4.0 Inline Elements

Most HTML 4.0 elements permitted within the BODY are classified as either block-level elements or inline elements. Inline elements typically may only contain text and other inline elements. When rendered visually, inline elements do not usually begin on a new line.

The following are defined as inline elements in HTML 4.0:

u A - Anchor

u ABBR - Abbreviation

u ACRONYM - Acronym

u B - Bold text

u BASEFONT - Base font change

u BDO - BiDi override

u BIG - Large text

u BR - Line break

u CITE - Citation

u CODE - Computer code

u DFN - Defined term

u EM - Emphasis

u FONT - Font change

u I - Italic text

u IMG - Inline image

u INPUT - Form input

u KBD - Text to be input

u LABEL - Form field label

u Q - Short quotation

u S - Strike-through text

u SAMP - Sample output

u SELECT - Option selector

u SMALL - Small text

u SPAN - Generic inline container

u STRIKE - Strike-through text

u STRONG - Strong emphasis

u SUB - Subscript

u SUP - Superscript

u TEXTAREA - Multi-line text input

u TT - Teletype text

u U - Underlined text

u VAR - Variable

The following elements may be used as either block-level elements or inline elements. If used as inline elements (e.g., within another inline element or a P), these elements should not contain any block-level elements.

u APPLET - Java Applet

u BUTTON - Button

u DEL - Deleted text

u IFRAME - Inline frame

u INS - Inserted text

u MAP - Image map

u OBJECT - Object

u SCRIPT - Client-side script

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


BASE - Document Base URI

BASE - Document Base URI

Syntax <BASE>
Attribute Specifications u HREF=URI (base URI reference)  u TARGET=FrameTarget (frame to render links in)
Contents Empty
Contained in HEAD

The BASE element defines the document's base URI for resolving relative URIs contained within the document. A document cannot contain more than one BASE element. When present, the BASE element must appear in the HEAD, prior to any elements that include a partial URI.

BASE's HREF attribute, required in HTML 4.0 Strict, specifies the absolute URI used to resolve relative URIs. See Using Relative URLs for more details on using and resolving relative URIs.

Most Web pages do not require an explicit base URI since the document's URI is a suitable base. An explicit base URI is only required when the same document may be accessed at different URIs or when the document has no URI (e.g., sending an HTML document by e-mail).

The TARGET attribute is used with frames to specify in which frame all links in document should be rendered by default. The target frame specified by BASE can be overridden by a given link using the link's TARGET attribute.

If no frame with the specified target name exists, the links are rendered in a new window unless overridden by the user. Special frame names begin with an underscore:

u _blank renders the links in a new, unnamed window

u _self renders the links in the current frame

u _parent renders the links in the immediate FRAMESET parent

u _top renders the links in the full, unframed window

More Information

u BASE in W3C HTML 4.0 Recommendation

u BASE in W3C HTML 3.2 Recommendation

u BASE in HTML 2.0 Standard

u BASE in WDG HTML 3.2 Reference

u BASE in Learning HTML 3.2 by Examples

u RFC 1808: Relative Uniform Resource Locators

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


ISINDEX - Input Prompt

ISINDEX - Input Prompt

Syntax <ISINDEX>
Attribute Specifications u PROMPT=Text (Prompt message)  u core attributes  u internationalization attributes
Contents Empty
Contained in APPLET, BLOCKQUOTE, BODY, CENTER, DD, DEL, DIV, FIELDSET, FORM, HEAD, IFRAME, INS, LI, MAP, NOFRAMES, NOSCRIPT, OBJECT, TD, TH

The ISINDEX element defines a single-line text input. The label of the input field is specified using the element's PROMPT attribute. ISINDEX is deprecated in HTML 4.0 in favor of the INPUT element.

The ISINDEX element is equivalent to a FORM with a single INPUT of type text, a METHOD of get, and an ACTION pointing to the URI of the document containing the ISINDEX element.

More Information

u ISINDEX in W3C HTML 4.0 Recommendation

u ISINDEX in W3C HTML 3.2 Recommendation

u ISINDEX in HTML 2.0 Standard

u ISINDEX in WDG HTML 3.2 Reference

u ISINDEX in Learning HTML 3.2 by Examples

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


META - Metadata

META - Metadata

Syntax <META>
Attribute Specifications u NAME=Name (property name)  u HTTP-EQUIV=Name (HTTP response header name)  u CONTENT=CDATA (associated data)  u SCHEME=CDATA (form of data)  u internationalization attributes (for the CONTENT)
Contents Empty
Contained in HEAD

The META element provides metadata such as a document's keywords, description, and author. Any number of META elements may be contained in the HEAD of a document.

META's NAME attribute provides a property name while the CONTENT attribute gives the corresponding value. The CONTENT attribute value may contain text and entities, but it may not contain HTML tags.

The optional SCHEME attribute gives the format of the property value. For example, a date property may require SCHEME="Month-Day-Year" to disambiguate the date from other formats such as SCHEME="Day-Month-Year".

There is no standard list of META properties, so authors may define whatever metadata they like. The following example defines the author of the document:

<META NAME=author CONTENT="Liam Quinn">

Some search engines use keywords and description properties, giving extra weight to a document's keywords and providing its description with the link to the document. Example:

<META NAME="description" CONTENT="A description of HTML 4.0's META element for metadata.">
<META NAME="keywords" CONTENT="META, meta element, metadata, metainformation, meta data, meta information, keywords, description, refresh, HyperText Markup Language, HTML, HTML4, HTML 4.0, Web Design Group, WDG, &lt;meta&gt; tag, &lt;META&gt; tag">

To avoid being truncated by search engines, the description should be brief--no more than 200 characters. Keywords are separated by commas and may be considered case sensitive by search engines. If the same keywords are repeated too often in the META element, some search engines will not index the document. Search engines typically only process the first 1000 characters of the keywords list.

Some search engines also support the robots property for indicating whether a document should be indexed and whether its links should be followed. The associated CONTENT value is a comma-separated list of case-insensitive directives:

u index specifies that the page should be indexed while noindex specifies that it should not be indexed;

u follow specifies that the page's links should be followed while nofollow specifies that they should not be followed;

u all is equivalent to index,follow (the default value);

u none is equivalent to noindex,nofollow.

For example, the following META element tells search engines and other robots not to index the page but to follow links on it:

<META NAME=robots CONTENT="noindex,follow">

Few search engines support the robots property at this time. For greater compliance by robots, authors should use the Robots Exclusion Protocol if possible.

The HTTP-EQUIV attribute may be used in place of the NAME attribute to indicate that the property is an HTTP header. Some servers will send the HTTP header specified in the META element, and browsers often recognize the header even when it is not sent by the server. Examples:

<META HTTP-EQUIV=Expires CONTENT="Sun, 22 Mar 1998 16:18:35 GMT">

sets the expiry date of the document.

<META HTTP-EQUIV="Content-Script-Type" CONTENT="text/javascript">

sets the client-side scripting language for inline scripts to JavaScript.

<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">

sets the style language for inline styles to CSS.

<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=SHIFT_JIS">

sets the character encoding for the document to SHIFT_JIS (a Japanese encoding). Note that using META for this purpose rather than a true HTTP header causes some browsers to redraw the page after initially displaying it.

<META HTTP-EQUIV=Refresh CONTENT="10; URL=http://www.htmlhelp.com/">

tells the browser to load http://www.htmlhelp.com/ 10 seconds after the current document has finished loading. Not all browsers support this, so authors should provide an alternate means of moving to the new page where necessary. The Refresh header is sometimes used for "splash screens" or when a page has moved, but the technique is not very effective since users may not even be looking at the window that is to be refreshed and since it messes up the user's history on many browsers. Some search engines penalize pages that use a Refresh of a few seconds or less.

More Information

u META in W3C HTML 4.0 Recommendation

u META in W3C HTML 3.2 Recommendation

u META in HTML 2.0 Standard

u META in WDG HTML 3.2 Reference

u META in Learning HTML 3.2 by Examples

u Metadata at W3C

u The META tag: Controlling how your Web page is indexed by AltaVista

u Infoseek Submitting Tips

u HotBot FAQ: Descriptions, Titles, Keywords, and <meta> Tags

u Lycos Help: Robots Meta Tag

u Robots Exclusion

u HTML Author's Guide to the Robots META tag

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


TITLE - Document Title

TITLE - Document Title

Syntax <TITLE>...</TITLE>
Attribute Specifications u internationalization attributes
Contents Plain text (including entities)
Contained in HEAD

The TITLE element gives the document's title. Each document must have exactly one TITLE within the HEAD. TITLE contains plain text and entities; it may not contain other markup.

A good TITLE should be short and specific to the document's content so that it can be used as a title for a user's bookmark, a title for the display window on visual browsers, and a link from a search engine. A suggested limit for the number of characters in a TITLE is 60.

More Information

u TITLE in W3C HTML 4.0 Recommendation

u TITLE in W3C HTML 3.2 Recommendation

u TITLE in HTML 2.0 Standard

u TITLE in WDG HTML 3.2 Reference

u TITLE in Learning HTML 3.2 by Examples

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


ADDRESS - Contact Information

ADDRESS - Contact Information

Syntax <ADDRESS>...</ADDRESS>
Attribute Specifications u common attributes
Contents u In HTML 4.0 Strict: inline elements  u In HTML 4.0 Transitional: inline elements, P
Contained in APPLET, BLOCKQUOTE, BODY, BUTTON, CENTER, DD, DEL, DIV, FIELDSET, FORM, IFRAME, INS, LI, MAP, NOFRAMES, NOSCRIPT, OBJECT, TD, TH

The ADDRESS element provides contact information for a document or part of a document. Information provided by ADDRESS may include the names of the document's maintainers, links to the maintainers' Web pages, e-mail addresses for feedback, postal addresses, phone numbers, and so on. The ADDRESS element is not appropriate for all postal and e-mail addresses; it should be reserved for providing such information about the contact people for the document.

The following example, most appropriate at the end of a document, gives contact information about the maintainer:

<ADDRESS>Maintained by <A href="http://www.htmlhelp.com/%7Eliam/">Liam Quinn</A>
&lt;<A HREF="mailto:liam@htmlhelp.com">liam@htmlhelp.com</A>&gt;</ADDRESS>

ADDRESS can also be used to provide contact information for a portion of a document, typically a form. The next example gives users contact information to use in conjunction with an order form:

<FORM METHOD=post ACTION="/cgi-bin/order.cgi">

  <FIELDSET>
    <LEGEND ACCESSKEY=C>Credit Card Information<BR></LEGEND>
    <P>
      <LABEL ACCESSKEY=V>
        <INPUT TYPE=radio NAME=card VALUE=visa> Visa
      </LABEL>
      <LABEL ACCESSKEY=M>
        <INPUT TYPE=radio NAME=card VALUE=mc> MasterCard
      </LABEL>
      <BR>
      <LABEL ACCESSKEY=N>
        Number: <INPUT TYPE=text NAME=number>
      </LABEL>
      <LABEL ACCESSKEY=E>
        Expiry: <INPUT TYPE=text NAME=expiry>
      </LABEL>
    </P>
  </FIELDSET>

  <P>
    <INPUT TYPE=submit VALUE="Submit order" ACCESSKEY=S>
  </P>

  <ADDRESS>
    If you have any questions about ordering, contact us at
    <A HREF="mailto:orders@htmlhelp.com">orders@htmlhelp.com</A>,
    or phone our offices at 555-5555.
  </ADDRESS>

</FORM>

More Information

u ADDRESS in W3C HTML 4.0 Recommendation

u ADDRESS in W3C HTML 3.2 Recommendation

u ADDRESS in HTML 2.0 Standard

u ADDRESS in WDG HTML 3.2 Reference

u ADDRESS in Learning HTML 3.2 by Examples

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


BLOCKQUOTE - Block Quotation

BLOCKQUOTE - Block Quotation

Syntax <BLOCKQUOTE>...</BLOCKQUOTE>
Attribute Specifications u CITE=URI (source of quotation)  u common attributes
Contents u In HTML 4.0 Strict: one or more block-level elements or SCRIPT  u In HTML 4.0 Transitional: inline elements or block-level elements
Contained in APPLET, BLOCKQUOTE, BODY, BUTTON, CENTER, DD, DEL, DIV, FIELDSET, FORM, IFRAME, INS, LI, MAP, NOFRAMES, NOSCRIPT, OBJECT, TD, TH

The BLOCKQUOTE element defines a block quotation. Unlike inline quotations, block quotations may contain block-level elements such as P and TABLE, but BLOCKQUOTE may not be contained within a paragraph or inline element.

The optional CITE attribute of BLOCKQUOTE provides the URI of the source of the quotation. This attribute, not widely supported among browsers, allows readers to verify the authenticity of the quotation and also find related information.

The content of the BLOCKQUOTE element should be contained within other block-level elements, typically P. The following example features a quotation that includes multiple paragraphs and its own block quotation:

<BLOCKQUOTE CITE="http://www.bibliomania.com/Fiction/joyce/ulysses/telemac.html">
<P>He pointed his finger in friendly jest and went over to the parapet, laughing to himself. Stephen Dedalus stepped up, followed him wearily half way and sat down on the edge of the gunrest, watching him still as he propped his mirror on the parapet, dipped the brush in the bowl and lathered cheeks and neck.</P>
<P>Buck Mulligan's gay voice went on.</P>
<BLOCKQUOTE><P>My name is absurd too: Malachi Mulligan, two dactyls. But it has a Hellenic ring, hasn't it? Tripping and sunny like the buck himself. We must go to Athens. Will you come if I can get the aunt to fork out twenty quid?</P></BLOCKQUOTE>
</BLOCKQUOTE>

Authors should not use BLOCKQUOTE for unquoted material just to achieve a block indentation in common visual browsers. With the rise of style sheets, such misuse of BLOCKQUOTE will become less reliable while also reducing the author's ability to fully exploit the power of style sheets. Cascading Style Sheets provide the margin-left property to indent a block.

More Information

u BLOCKQUOTE in W3C HTML 4.0 Recommendation

u BLOCKQUOTE in W3C HTML 3.2 Recommendation

u BLOCKQUOTE in HTML 2.0 Standard

u BLOCKQUOTE in WDG HTML 3.2 Reference

u BLOCKQUOTE in Learning HTML 3.2 by Examples

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


CENTER - Centered Block

CENTER - Centered Block

Syntax <CENTER>...</CENTER>
Attribute Specifications u common attributes
Contents Inline elements, block-level elements
Contained in APPLET, BLOCKQUOTE, BODY, BUTTON, CENTER, DD, DEL, DIV, FIELDSET, FORM, IFRAME, INS, LI, MAP, NOFRAMES, NOSCRIPT, OBJECT, TD, TH

The CENTER element defines a block whose contents are centered horizontally on visual browsers. <CENTER> is a shorthand for <DIV ALIGN=center>, though CENTER is slightly better supported among browsers. Both methods of centering are deprecated in favor of style sheets.

CENTER is still useful for centering tables since many browsers lack support for <TABLE ALIGN=center> as well as the method of centering tables with Cascading Style Sheets (setting margin-left and margin-right to auto). An example follows:

<CENTER>
  <TABLE>
    <TR ALIGN=center>
      <TH SCOPE=col>Name</TH>
      <TH SCOPE=col>Age</TH>
      <TH SCOPE=col>Country</TH>
    </TR>
    <TR ALIGN=center>
      <TD>Liam Quinn</TD>
      <TD>20</TD>
      <TD>Canada</TD>
    </TR>
  </TABLE>
</CENTER>

Note that CENTER only centers the table as a whole, not the contents of each table cell. The preceding example uses the ALIGN attribute of TR to center the contents of each cell. The text-align property of Cascading Style Sheets provides greater flexibility in suggesting horizontal alignment.

More Information

u CENTER in W3C HTML 4.0 Recommendation

u CENTER in W3C HTML 3.2 Recommendation

u CENTER in WDG HTML 3.2 Reference

u CENTER in Learning HTML 3.2 by Examples

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


DIV - Generic Block-level Container

DIV - Generic Block-level Container

Syntax <DIV>...</DIV>
Attribute Specifications u ALIGN=[ left | center | right | justify ] (horizontal alignment)  u common attributes
Contents Inline elements, block-level elements
Contained in APPLET, BLOCKQUOTE, BODY, BUTTON, CENTER, DD, DEL, DIV, FIELDSET, FORM, IFRAME, INS, LI, MAP, NOFRAMES, NOSCRIPT, OBJECT, TD, TH

The DIV element defines a generic block-level container, allowing authors to provide style or language information to blocks of content. The element may contain any inline or block-level element, including another DIV.

The DIV element is most useful in combination with the CLASS, ID, or LANG attributes. For example, a navigation bar could be contained within a DIV marked as CLASS=navbar, allowing the author to use style sheets to easily change the background of all navigation bars on a site, or to eliminate navigation bars when printing.

The deprecated ALIGN attribute suggests the horizontal alignment for the content of the division on visual browsers. Possible values are left, right, center, and justify. <CENTER> is a slightly better-supported alias for <DIV ALIGN=center>, though both methods of centering are deprecated in favor of style sheets, which provide greater flexibility in suggesting alignment.

SPAN is a text-level equivalent of DIV for use within paragraphs and inline elements.

More Information

u DIV in W3C HTML 4.0 Recommendation

u DIV in W3C HTML 3.2 Recommendation

u DIV in WDG HTML 3.2 Reference

u DIV in Learning HTML 3.2 by Examples

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


H1 - Level-one Heading

H1 - Level-one Heading

Syntax <H1>...</H1>
Attribute Specifications u ALIGN=[ left | center | right | justify ] (horizontal alignment)  u common attributes
Contents Inline elements
Contained in APPLET, BLOCKQUOTE, BODY, BUTTON, CENTER, DEL, DD, DIV, FIELDSET, FORM, IFRAME, INS, LI, MAP, NOFRAMES, NOSCRIPT, OBJECT, TD, TH

The H1 element defines a level-one heading. A document generally should have exactly one H1 element to mark the most important heading.

The deprecated ALIGN attribute suggests the horizontal alignment for the heading on visual browsers. Possible values are left, right, center, and justify. Style sheets provide greater flexibility in suggesting alignment.

Visual browsers typically render H1 in a large, bold font. Authors can suggest a presentation for H1 through style sheets. The following CSS ruleset suggests a presentation for all H1 elements:

h1 {
  color: #c33;
  background: transparent;
  font-weight: bold;
  text-align: center
}

Authors should not choose a heading level based on the font size commonly used by visual browsers. The heading level should be chosen based on the heading's importance and placement in the document. An H1 is typically used as the main heading for a document.

More Information

u H1 in W3C HTML 4.0 Recommendation

u H1 in W3C HTML 3.2 Recommendation

u H1 in HTML 2.0 Standard

u H1 in WDG HTML 3.2 Reference

u H1 in Learning HTML 3.2 by Examples

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


H2 - Level-two Heading

H2 - Level-two Heading

Syntax <H2>...</H2>
Attribute Specifications u ALIGN=[ left | center | right | justify ] (horizontal alignment)  u common attributes
Contents Inline elements
Contained in APPLET, BLOCKQUOTE, BODY, BUTTON, CENTER, DEL, DD, DIV, FIELDSET, FORM, IFRAME, INS, LI, MAP, NOFRAMES, NOSCRIPT, OBJECT, TD, TH

The H2 element defines a level-two heading. This heading is more important than an H3 but less important than an H1.

The deprecated ALIGN attribute suggests the horizontal alignment for the heading on visual browsers. Possible values are left, right, center, and justify. Style sheets provide greater flexibility in suggesting alignment.

Visual browsers typically render H2 in a large, bold font. Authors can suggest a presentation for H2 through style sheets. The following CSS ruleset suggests a presentation for all H2 elements:

h2 {
  color: #00008b;
  background: transparent;
  font-weight: bold;
  margin-left: 2%;
  margin-right: 2%
}

Authors should not choose a heading level based on the font size commonly used by visual browsers. The heading level should be chosen based on the heading's importance and placement in the document. An H2 is typically used within a section headed by an H1.

More Information

u H2 in W3C HTML 4.0 Recommendation

u H2 in W3C HTML 3.2 Recommendation

u H2 in HTML 2.0 Standard

u H2 in WDG HTML 3.2 Reference

u H2 in Learning HTML 3.2 by Examples

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


H3 - Level-three Heading

H3 - Level-three Heading

Syntax <H3>...</H3>
Attribute Specifications u ALIGN=[ left | center | right | justify ] (horizontal alignment)  u common attributes
Contents Inline elements
Contained in APPLET, BLOCKQUOTE, BODY, BUTTON, CENTER, DEL, DD, DIV, FIELDSET, FORM, IFRAME, INS, LI, MAP, NOFRAMES, NOSCRIPT, OBJECT, TD, TH

The H3 element defines a level-three heading. This heading is more important than an H4 but less important than an H2.

The deprecated ALIGN attribute suggests the horizontal alignment for the heading on visual browsers. Possible values are left, right, center, and justify. Style sheets provide greater flexibility in suggesting alignment.

Visual browsers typically render H3 in a bold font. Authors can suggest a presentation for H3 through style sheets. The following CSS ruleset suggests a presentation for all H3 elements:

h3 {
  color: #006400;
  background: transparent;
  margin-left: 4%;
  margin-right: 4%;
  font-weight: bold
}

Authors should not choose a heading level based on the font size commonly used by visual browsers. The heading level should be chosen based on the heading's importance and placement in the document. An H3 is typically used within a section headed by an H2.

More Information

u H3 in W3C HTML 4.0 Recommendation

u H3 in W3C HTML 3.2 Recommendation

u H3 in HTML 2.0 Standard

u H3 in WDG HTML 3.2 Reference

u H3 in Learning HTML 3.2 by Examples

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


H4 - Level-four Heading

H4 - Level-four Heading

Syntax <H4>...</H4>
Attribute Specifications u ALIGN=[ left | center | right | justify ] (horizontal alignment)  u common attributes
Contents Inline elements
Contained in APPLET, BLOCKQUOTE, BODY, BUTTON, CENTER, DEL, DD, DIV, FIELDSET, FORM, IFRAME, INS, LI, MAP, NOFRAMES, NOSCRIPT, OBJECT, TD, TH

The H4 element defines a level-four heading. This heading is more important than an H5 but less important than an H3.

The deprecated ALIGN attribute suggests the horizontal alignment for the heading on visual browsers. Possible values are left, right, center, and justify. Style sheets provide greater flexibility in suggesting alignment.

Visual browsers typically render H4 in a bold font. Authors can suggest a presentation for H4 through style sheets. The following CSS ruleset suggests a presentation for all H4 elements:

h4 {
  margin-left: 6%;
  margin-right: 6%;
  font-weight: bold
}

Authors should not choose a heading level based on the font size commonly used by visual browsers. The heading level should be chosen based on the heading's importance and placement in the document. An H4 is typically used within a section headed by an H3.

More Information

u H4 in W3C HTML 4.0 Recommendation

u H4 in W3C HTML 3.2 Recommendation

u H4 in HTML 2.0 Standard

u H4 in WDG HTML 3.2 Reference

u H4 in Learning HTML 3.2 by Examples

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


H5 - Level-five Heading

H5 - Level-five Heading

Syntax <H5>...</H5>
Attribute Specifications u ALIGN=[ left | center | right | justify ] (horizontal alignment)  u common attributes
Contents Inline elements
Contained in APPLET, BLOCKQUOTE, BODY, BUTTON, CENTER, DEL, DD, DIV, FIELDSET, FORM, IFRAME, INS, LI, MAP, NOFRAMES, NOSCRIPT, OBJECT, TD, TH

The H5 element defines a level-five heading. This heading is more important than an H6 but less important than an H4.

The deprecated ALIGN attribute suggests the horizontal alignment for the heading on visual browsers. Possible values are left, right, center, and justify. Style sheets provide greater flexibility in suggesting alignment.

Visual browsers typically render H5 in a small, bold font. Authors can suggest a presentation for H5 through style sheets. The following CSS ruleset suggests a presentation for all H5 elements:

h5 {
  margin-left: 6%;
  margin-right: 6%;
  font-size: 110%;
  font-weight: bold
}

Authors should not choose a heading level based on the font size commonly used by visual browsers. The heading level should be chosen based on the heading's importance and placement in the document. An H5 is typically used within a section headed by an H4.

More Information

u H5 in W3C HTML 4.0 Recommendation

u H5 in W3C HTML 3.2 Recommendation

u H5 in HTML 2.0 Standard

u H5 in WDG HTML 3.2 Reference

u H5 in Learning HTML 3.2 by Examples

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


H6 - Level-six Heading

H6 - Level-six Heading

Syntax <H6>...</H6>
Attribute Specifications u ALIGN=[ left | center | right | justify ] (horizontal alignment)  u common attributes
Contents Inline elements
Contained in APPLET, BLOCKQUOTE, BODY, BUTTON, CENTER, DEL, DD, DIV, FIELDSET, FORM, IFRAME, INS, LI, MAP, NOFRAMES, NOSCRIPT, OBJECT, TD, TH

The H6 element defines a level-six heading. This heading is less important than an H5.

The deprecated ALIGN attribute suggests the horizontal alignment for the heading on visual browsers. Possible values are left, right, center, and justify. Style sheets provide greater flexibility in suggesting alignment.

Visual browsers typically render H6 in a small, bold font. Authors can suggest a presentation for H6 through style sheets. The following CSS ruleset suggests a presentation for all H6 elements:

h6 {
  margin-left: 6%;
  margin-right: 6%;
  font-size: 105%;
  font-weight: bold
}

Authors should not choose a heading level based on the font size commonly used by visual browsers. The heading level should be chosen based on the heading's importance and placement in the document. An H6 is typically used within a section headed by an H5.

More Information

u H6 in W3C HTML 4.0 Recommendation

u H6 in W3C HTML 3.2 Recommendation

u H6 in HTML 2.0 Standard

u H6 in WDG HTML 3.2 Reference

u H6 in Learning HTML 3.2 by Examples

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


HR - Horizontal Rule

HR - Horizontal Rule

Syntax <HR>
Attribute Specifications u ALIGN=[ left | center | right ] (horizontal alignment)  u NOSHADE (solid line)  u SIZE=Pixels (line height)  u WIDTH=Length (line width)  u core attributes  u common events
Contents Empty
Contained in APPLET, BLOCKQUOTE, BODY, BUTTON, CENTER, DD, DEL, DIV, FIELDSET, FORM, IFRAME, INS, LI, MAP, NOFRAMES, NOSCRIPT, OBJECT, TD, TH

The HR element defines a horizontal rule for visual browsers. While this element is inherently presentational, it can be used structurally as a section divider. However, for greater flexibility the HR element can be replaced with the border-bottom or border-top properties of Cascading Style Sheets. For example, the following style rule would suggest a horizontal line above all DIV elements with CLASS=navbar:

div.navbar { border-top: solid medium navy }

HR's deprecated ALIGN attribute suggests the horizontal alignment of the line. Possible values are left, right, and center. The deprecated WIDTH attribute specifies the width of the line as a percentage or a number of pixels. If a width is specified, percentages are generally preferred since they adjust to varying window sizes. The width property of Cascading Style Sheets provides greater flexibility in suggesting the width of horizontal rules.

The boolean NOSHADE attribute suggests that the rule be rendered as a solid line rather than the groove style commonly used. The SIZE attribute suggests the height of the line in pixels. These attributes are both deprecated in favor of style sheets.

More Information

u HR in W3C HTML 4.0 Recommendation

u HR in W3C HTML 3.2 Recommendation

u HR in HTML 2.0 Standard

u HR in WDG HTML 3.2 Reference

u HR in Learning HTML 3.2 by Examples

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


PRE - Preformatted Text

PRE - Preformatted Text

Syntax <PRE>...</PRE>
Attribute Specifications u WIDTH=Number (line width)  u common attributes
Contents Inline elements except IMG, OBJECT, APPLET, BIG, SMALL, SUB, SUP, FONT, BASEFONT
Contained in APPLET, BLOCKQUOTE, BODY, BUTTON, CENTER, DD, DEL, DIV, FIELDSET, FORM, IFRAME, INS, LI, MAP, NOFRAMES, NOSCRIPT, OBJECT, TD, TH

The PRE element contains preformatted text. Visual browsers should render preformatted text in a fixed-pitch font, should not collapse whitespace, and should not wrap long lines.

PRE is useful for formatting computer code or poetry where whitespace is important, but since preformatted text is inherently visual, authors should avoid dependence on it wherever possible. When using PRE, authors should avoid altering the element's fixed-pitch font or non-collapsing whitespace properties by means of style sheets.

The following example features Java code in a PRE element:

<PRE><CODE CLASS=Java>
class HelloWorld {
  public static void main(String[] args) {
    System.out.println("Hello World!");
  }
}
</CODE></PRE>

The code in the preceding example would be more difficult to read if it were not preformatted, and so PRE is used to provide the proper spacing. Note that the CODE element is also included to add structural information.

The deprecated WIDTH attribute of PRE tells the browser the expected line length of the preformatted block so that a suitable font size or margin can be used. Browsers ignore this attribute in practice.

The bidirectional algorithm that determines the directionality of text still applies within the PRE element.

More Information

u PRE in W3C HTML 4.0 Recommendation

u PRE in W3C HTML 3.2 Recommendation

u PRE in HTML 2.0 Standard

u PRE in WDG HTML 3.2 Reference

u PRE in Learning HTML 3.2 by Examples

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


DIR - Directory List

DIR - Directory List

Syntax <DIR>...</DIR>
Attribute Specifications u COMPACT (compact display)  u common attributes
Contents One or more LI elements that cannot contain block-level elements
Contained in APPLET, BLOCKQUOTE, BODY, BUTTON, CENTER, DD, DEL, DIV, FIELDSET, FORM, IFRAME, INS, LI, MAP, NOFRAMES, NOSCRIPT, OBJECT, TD, TH

The DIR element defines a directory list. The element contains one or more LI elements that define the actual items of the list. The LI elements must not contain block-level elements, which prevents DIRs from being nested.

The COMPACT attribute suggests that visual browsers render the list compactly, perhaps with reduced spacing between items. This attribute is not well supported among browsers.

DIR is deprecated in HTML 4.0 in favor of UL.

More Information

u DIR in W3C HTML 4.0 Recommendation

u DIR in W3C HTML 3.2 Recommendation

u DIR in HTML 2.0 Standard

u DIR in WDG HTML 3.2 Reference

u DIR in Learning HTML 3.2 by Examples

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


DL - Definition List

DL - Definition List

Syntax <DL>...</DL>
Attribute Specifications u COMPACT (compact display)  u common attributes
Contents One or more DT or DD elements
Contained in APPLET, BLOCKQUOTE, BODY, BUTTON, CENTER, DD, DEL, DIV, FIELDSET, FORM, IFRAME, INS, LI, MAP, NOFRAMES, NOSCRIPT, OBJECT, TD, TH

The DL element defines a definition list. An entry in the list is created using the DT element for the term being defined and the DD element for the definition of the term.

A definition list can have multiple terms for a given definition as well as multiple definitions for a given term. Authors can also give a term without a corresponding definition, and vice versa, but such a structure rarely makes sense.

An example follows:

<DL>

  <DT>Block-level elements</DT>
  <DD>
    <P>
      In HTML, block-level elements may generally contain
      inline elements and other block-level elements. They are
      usually formatted differently than inline elements,
      typically on a new line in visual browsers.
    </P>
  </DD>

  <DT>Inline elements</DT>
  <DT>Text-level elements</DT>
  <DD>
    <P>
      Inline (or text-level) elements generally only contain
      character data and other inline elements.
    </P>
  </DD>

</DL>

The DL element can be adapted for use with structures that are not strict terms and definitions, a practice that is justified when other HTML elements cannot adequately describe a structure. Some examples follow:

u

<H1>Community Calendar</H1>

<DL CLASS=calendar>

  <DT>March 8</DT>
  <DD>
    The Symphony Orchestra presents <CITE>A Rising Star</CITE>
    at the Anderson Center. Call 555-1234 for details.
  </DD>

  <DT>March 10</DT>
  <DD>
    Bereaved Families Support Night, 7:00 to 9:00 at
    523 Main <ABBR TITLE=Street>St.</ABBR>
  </DD>

</DL>

u

<DL CLASS=play>

  <DT>Brutus</DT>
  <DD CLASS="role Brutus">
    <P>
      I kiss thy hand, but not in flattery, Caesar;<BR>
      Desiring thee that Publius Cimber may<BR>
      Have an immediate freedom of repeal.
    </P>
  </DD>

  <DT>Caesar</DT>
  <DD CLASS="role Caesar">
    <P>
      What, Brutus!
    </P>
  </DD>

  <DT>Cassius</DT>
  <DD CLASS="role Cassius">
    <P>
      Pardon, Caesar; Caesar, pardon:<BR>
      As low as to thy foot doth Cassius fall,<BR>
      To beg enfranchisement for Publius Cimber.
    </P>
  </DD>

</DL>

Note the use of the CLASS attribute in the preceding examples. This allows the author to easily suggest, through style sheets, a distinguishing presentation for different kinds of definition lists.

In addition to the common attributes shared by most elements, DL takes a COMPACT attribute. This attribute, deprecated in HTML 4.0 and poorly supported among browsers, suggests that visual browsers render the list compactly, perhaps with reduced spacing between items.

More Information

u DL in W3C HTML 4.0 Recommendation

u DL in W3C HTML 3.2 Recommendation

u DL in HTML 2.0 Standard

u DL in WDG HTML 3.2 Reference

u UL in Learning HTML 3.2 by Examples

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


DT - Definition Term

DT - Definition Term

Syntax <DT>...</DT>
Attribute Specifications u common attributes
Contents Inline elements
Contained in DL

The DT element defines a term in a definition list. The closing tag for DT is optional, but its use prevents common browser bugs with style sheets. Note that DT cannot contain block-level elements such as P and H2.

A DT element should generally be followed by a DD element that provides the definition for the term given by the DT. A single definition term may have multiple definitions associated with it, and a single definition may have multiple terms.

More Information

u DT in W3C HTML 4.0 Recommendation

u DT in W3C HTML 3.2 Recommendation

u DT in HTML 2.0 Standard

u DT in WDG HTML 3.2 Reference

u DT in Learning HTML 3.2 by Examples

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


DD - Definition Description

DD - Definition Description

Syntax <DD>...</DD>
Attribute Specifications u common attributes
Contents Inline elements, block-level elements
Contained in DL

The DD element provides the definition of a term in a definition list. The closing tag for DD is optional, but its use prevents common browser bugs with style sheets.

DD may contain block-level elements such as P, H2, TABLE, and DL. This allows definition lists to be nested, as in the following example:

<DL>

  <DT><A NAME="spanning-tree">Spanning tree</A></DT>
  <DD>
    <P>
      A spanning tree of a graph is a <A HREF="#tree">tree</A>
      that contains all the vertices of the graph. There are two
      main types of spanning trees:
    </P>

    <DL>
      <DT>BFS spanning tree</DT>
      <DD>
        A spanning tree formed by a breadth-first search on the graph.
      </DD>
      <DT>DFS spanning tree</DT>
      <DD>
        A spanning tree formed by a depth-first search on the graph.
      </DD>
    </DL>
  </DD>

  <DT><A NAME=tree>Tree</A></DT>
  <DD>
    <P>
      A tree is a connected, undirected graph without cycles.
    </P>
  </DD>

</DL>

A DD element should generally be preceded by a DT element that gives the term defined by the DD. A single definition term may have multiple definitions associated with it, and a single definition may have multiple terms.

More Information

u DD in W3C HTML 4.0 Recommendation

u DD in W3C HTML 3.2 Recommendation

u DD in HTML 2.0 Standard

u DD in WDG HTML 3.2 Reference

u DD in Learning HTML 3.2 by Examples

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


MENU - Menu List

MENU - Menu List

Syntax <MENU>...</MENU>
Attribute Specifications u COMPACT (compact display)  u common attributes
Contents One or more LI elements that cannot contain block-level elements
Contained in APPLET, BLOCKQUOTE, BODY, BUTTON, CENTER, DD, DEL, DIV, FIELDSET, FORM, IFRAME, INS, LI, MAP, NOFRAMES, NOSCRIPT, OBJECT, TD, TH

The MENU element defines a menu list. The element contains one or more LI elements that define the actual items of the list. The LI elements must not contain block-level elements, which prevents MENUs from being nested.

The COMPACT attribute suggests that visual browsers render the list compactly, perhaps with reduced spacing between items. This attribute is not well supported among browsers.

MENU is deprecated in HTML 4.0 in favor of UL.

More Information

u MENU in W3C HTML 4.0 Recommendation

u MENU in W3C HTML 3.2 Recommendation

u MENU in HTML 2.0 Standard

u MENU in WDG HTML 3.2 Reference

u MENU in Learning HTML 3.2 by Examples

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


OL - Ordered List

OL - Ordered List

Syntax <OL>...</OL>
Attribute Specifications u TYPE=[ 1 | a | A | i | I ] (numbering style)  u START=Number (starting number)  u COMPACT (compact display)  u common attributes
Contents One or more LI elements
Contained in APPLET, BLOCKQUOTE, BODY, BUTTON, CENTER, DD, DEL, DIV, FIELDSET, FORM, IFRAME, INS, LI, MAP, NOFRAMES, NOSCRIPT, OBJECT, TD, TH

The OL element defines an ordered list. The element contains one or more LI elements that define the actual items of the list.

Unlike with an unordered list (UL), the items of an ordered list have a definite sequence. Items in an ordered list are numbered by the browser.

The deprecated TYPE attribute of OL suggests the numbering style on visual browsers. The case-sensitive values are as follows:

u 1 (decimal numbers: 1, 2, 3, 4, 5, ...)

u a (lowercase alphabetic: a, b, c, d, e, ...)

u A (uppercase alphabetic: A, B, C, D, E, ...)

u i (lowercase Roman numerals: i, ii, iii, iv, v, ...)

u I (uppercase Roman numerals: I, II, III, IV, V, ...)

The numbering style on an individual list item can be suggested using the TYPE attribute of LI. The list-style-type property of CSS provides greater flexibility in suggesting numbering styles.

The deprecated START attribute suggests the starting number for the list and defaults to 1. The value of START must be an integer, but the number may be presented in a different form (for example, as a Roman numeral). While this attribute is deprecated, there is currently no substitute for it in Cascading Style Sheets.

The deprecated COMPACT attribute suggests that visual browsers render the list compactly, perhaps with reduced spacing between items. This attribute is not well supported among browsers.

More Information

u OL in W3C HTML 4.0 Recommendation

u OL in W3C HTML 3.2 Recommendation

u OL in HTML 2.0 Standard

u OL in WDG HTML 3.2 Reference

u OL in Learning HTML 3.2 by Examples

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


UL - Unordered List

UL - Unordered List

Syntax <UL>...</UL>
Attribute Specifications u TYPE=[ disc | square | circle ] (bullet style)  u COMPACT (compact display)  u common attributes
Contents One or more LI elements
Contained in APPLET, BLOCKQUOTE, BODY, BUTTON, CENTER, DD, DEL, DIV, FIELDSET, FORM, IFRAME, INS, LI, MAP, NOFRAMES, NOSCRIPT, OBJECT, TD, TH

The UL element defines an unordered list. The element contains one or more LI elements that define the actual items of the list.

Unlike with an ordered list (OL), the items of an unordered list have no sequence. In theory, users should be able to change the order of items in an unordered list (e.g., alphabetizing them).

Visual browsers typically render UL with a bullet preceding each list item, but authors can suggest various presentations using style sheets. The list-style property of Cascading Style Sheets allows authors to suppress bullets, use images as list item markers, and more.

The deprecated TYPE attribute of UL suggests the bullet style on visual browsers. Possible values are as follows:

u disc (a filled-in circle)

u square (a square outline)

u circle (a circle outline)

The bullet style on an individual list item can be suggested using the TYPE attribute of LI. The list-style-type property of CSS provides greater flexibility in suggesting bullet styles.

The deprecated COMPACT attribute suggests that visual browsers render the list compactly, perhaps with reduced spacing between items. This attribute is not well supported among browsers.

More Information

u UL in W3C HTML 4.0 Recommendation

u UL in W3C HTML 3.2 Recommendation

u UL in HTML 2.0 Standard

u UL in WDG HTML 3.2 Reference

u UL in Learning HTML 3.2 by Examples

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


CAPTION - Table Caption

CAPTION - Table Caption

Syntax <CAPTION>...</CAPTION>
Attribute Specifications u ALIGN=[ top | bottom | left | right ] (caption alignment)  u common attributes
Contents Inline elements
Contained in TABLE

The CAPTION element defines a table caption. When used, CAPTION must be the first element in the TABLE. Only inline elements (e.g., STRONG) may be used within CAPTION.

A good caption should provide a short heading for the table. For simple tables, the caption can also act as an adequate summary, but for more complex tables, authors should supplement the CAPTION with a full summary, either through TABLE's SUMMARY attribute or within a paragraph outside of the TABLE. The following example features a simple table where the CAPTION provides a heading and an adequate table summary:

<TABLE>
  <CAPTION>Common Usenet Abbreviations</CAPTION>
  <THEAD>
    <TR>
      <TH>Abbreviation</TH>
      <TH>Long Form</TH>
    </TR>
  </THEAD>
  <TBODY>
    <TR>
      <TD>AFAIK</TD>
      <TD>As Far As I Know</TD>
    </TR>
    <TR>
      <TD>IMHO</TD>
      <TD>In My Humble Opinion</TD>
    </TR>
    <TR>
      <TD>OTOH</TD>
      <TD>On The Other Hand</TD>
    </TR>
  </TBODY>
</TABLE>

The next example uses TABLE's SUMMARY attribute to complement the CAPTION:

<TABLE SUMMARY="This table gives the character entity reference,
                decimal character reference, and hexadecimal character
                reference for symbols and Greek letters.">
  <CAPTION>Symbols and Greek Letters in HTML 4.0</CAPTION>
  <COLGROUP>
  <COLGROUP SPAN=3>
  <THEAD>
    <TR>
      <TH SCOPE=col>Character</TH>
      <TH SCOPE=col>Entity</TH>
      <TH SCOPE=col>Decimal</TH>
      <TH SCOPE=col>Hex</TH>
    </TR>
  </THEAD>
  <TBODY>
    <TR>
      <TD SCOPE=row>Latin small f with hook</TD>
      <TD>&amp;fnof;</TD>
      <TD>&amp;#402;</TD>
      <TD>&amp;#x192;</TD>
    </TR>
    ...
  </TBODY>
</TABLE>

The deprecated ALIGN attribute of CAPTION specifies the alignment of the caption relative to the table. Possible values are top (the default), bottom, left, and right.

More Information

u CAPTION in W3C HTML 4.0 Recommendation

u CAPTION in W3C HTML 3.2 Recommendation

u CAPTION in WDG HTML 3.2 Reference

u CAPTION in Learning HTML 3.2 by Examples

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


TR - Table Row

TR - Table Row

Syntax <TR>...</TR>
Attribute Specifications u ALIGN=[ left | center | right | justify | char ] (horizontal alignment of cells in group)  u CHAR=Character (alignment character for cells)  u CHAROFF=Length (alignment character offset)  u VALIGN=[ top | middle | bottom | baseline ] (vertical alignment of cells in group)  u BGCOLOR=Color (row background color)  u common attributes
Contents One or more TH or TD elements
Contained in THEAD, TFOOT, TBODY

The TR element defines a table row. TR elements must be contained within a row group defined by THEAD, TFOOT, or TBODY. Since the start and end tags of TBODY are optional when the table has one TBODY and no THEAD or TFOOT, the simple table structure of HTML 3.2 is still valid:

<TABLE>
  <TR>
    <TH>Abbreviation</TH>
    <TH>Long Form</TH>
  </TR>
  <TR>
    <TD>AFAIK</TD>
    <TD>As Far As I Know</TD>
  </TR>
</TABLE>

TR contains TH or TD elements, which in turn contain the actual data of the table. In addition to the attributes common to most elements, TR takes presentational attributes for specifying the alignment of cells within the row and the row's background color.

The ALIGN attribute specifies the horizontal alignment for each cell in the row. Possible values are left, center, right, justify, and char. ALIGN=char aligns a cell's contents on the character given in the CHAR attribute. The default value for the CHAR attribute is the decimal point of the current language--a period in English. The CHAROFF attribute specifies the offset to the first occurrence of the alignment character. The attribute's value is a number in pixels or a percentage of the cell's width; CHAROFF="50%" centers the alignment character horizontally in a cell.

The VALIGN attribute specifies the vertical position of a cell's contents. Possible values are:

u top, which positions data at the top of the cell;

u middle, the default value, which centers the cell data vertically;

u bottom, which positions data at the bottom of the cell;

u baseline, which specifies that the first line of each cell in the row with ALIGN=baseline should occur on a common baseline.

The deprecated BGCOLOR attribute suggests a background color for the row. The combination of this attribute with <FONT COLOR=...> can leave invisible or unreadable text on Netscape Navigator 2.x, which does not support BGCOLOR on table elements. BGCOLOR is dangerous even on supporting browsers, since most fail to override it when overriding other author-specified colors. Style sheets provide a safer, more flexible method of specifying a row's background color.

More Information

u TR in W3C HTML 4.0 Recommendation

u TR in W3C HTML 3.2 Recommendation

u TR in WDG HTML 3.2 Reference

u TR in Learning HTML 3.2 by Examples

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


FORM - Interactive Form

FORM - Interactive Form

Syntax <FORM>...</FORM>
Attribute Specifications u ACTION=URI (form handler)  u METHOD=[ get | post ] (HTTP method for submitting form)  u ENCTYPE=ContentType (content type to submit form as)  u ACCEPT-CHARSET=Charsets (supported character encodings)  u TARGET=FrameTarget (frame to render form result in)  u ONSUBMIT=Script (form was submitted)  u ONRESET=Script (form was reset)  u common attributes
Contents u In HTML 4.0 Strict, one or more SCRIPT or block-level elements except FORM  u In HTML 4.0 Transitional, inline elements or block-level elements except FORM
Contained in APPLET, BLOCKQUOTE, BODY, CENTER, DD, DEL, DIV, FIELDSET, IFRAME, INS, LI, MAP, NOFRAMES, NOSCRIPT, OBJECT, TD, TH

The FORM element defines an interactive form. The element should contain form controls--INPUT, SELECT, TEXTAREA, and BUTTON--through which the user interacts.

When the user submits the form, through an INPUT or BUTTON element with TYPE=submit, the form values are submitted to the URI given in FORM's required ACTION attribute. ACTION usually points to a CGI script or Java servlet that handles the form submission.

A mailto URI (e.g., mailto:liam@htmlhelp.com) is also allowed as an ACTION, but this is not supported by all browsers. Non-supporting browsers such as Microsoft Internet Explorer 3.x typically will open a blank e-mail message when the user submits a mailto form. Even on supporting browsers, mailto forms are troublesome in that they fail to provide feedback to the user after the form submission.

Free CGI scripts exist for handling forms; some are even remotely hosted for authors whose providers refuse to allow CGI scripts to be run locally.

How the form input is sent to the server depends on the METHOD and ENCTYPE attributes. When the METHOD is get (the default), the form input is submitted as an HTTP GET request with ?form_data appended to the URI specified in the ACTION attribute.

Using the get method allows the form submission to be contained completely in a URL. This can be advantageous in that it permits bookmarking in current browsers, but it also prevents form data from containing non-ASCII characters such as "é" and "©". As well, the amount of form data that can be handled by the get method is limited by the maximum length of the URL that the server and browser can process. To be safe, any form whose input might contain non-ASCII characters or more than 100 characters should use METHOD=post.

With a METHOD value of post, the form input is submitted as an HTTP POST request with the form data sent in the body of the request. Most current browsers are unable to bookmark POST requests, but POST does not entail the character encoding and length restrictions imposed by GET.

The ENCTYPE attribute specifies the content type used in submitting the form, and defaults to application/x-www-form-urlencoded. This content type results in name/value pairs sent to the server as name1=value1&name2=value2... with space characters replaced by "+" and reserved characters (like "#") replaced by "%HH" where HH is the ASCII code of the character in hexadecimal. Line breaks are encoded as "%0D%0A"--a carriage return followed by a line feed.

Authors should generally only use a different ENCTYPE when the form includes a TYPE=file INPUT element, in which case the ENCTYPE should be multipart/form-data and the METHOD must be post. The format of multipart/form-data requests is given in RFC 1867.

Tools such as cg-eye allow authors to easily create and view a request, simulating the submission of a form. However, authors often do not need to concern themselves with the exact format of the submission; CGI libraries including CGI.pm transparently handle get and post submissions sent as application/x-www-form-urlencoded or multipart/form-data.

The ACCEPT-CHARSET attribute specifies a list of character encodings that are accepted by the form handler. The value consists of a list of "charsets" separated by commas and/or spaces. The default value is UNKNOWN and is usually considered to be the character encoding used to transmit the document containing the FORM.

The TARGET attribute is used with frames to specify in which frame the form response should be rendered. If no frame with such a name exists, the response is rendered in a new window unless overridden by the user. Special frame names begin with an underscore:

u _blank renders the response in a new, unnamed window

u _self renders the response in the current frame (useful for overriding a BASE TARGET)

u _parent renders the response in the immediate FRAMESET parent

u _top renders the response in the full, unframed window

The FORM element also takes a number of attributes to specify client-side scripting actions for various events. In addition to the core events common to most elements, INPUT accepts the following event attributes:

u ONSUBMIT, when the form is submitted;

u ONRESET, when the form is reset.

More Information

u FORM in W3C HTML 4.0 Recommendation

u FORM in W3C HTML 3.2 Recommendation

u FORM in HTML 2.0 Standard

u FORM in WDG HTML 3.2 Reference

u FORM in Learning HTML 3.2 by Examples

u RFC 1867: Form-based File Upload in HTML

u The Common Gateway Interface

u Java Servlets

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


INPUT - Form Input

INPUT - Form Input

Syntax <INPUT>
Attribute Specifications u TYPE=[ text | password | checkbox | radio | submit | reset | file | hidden | image | button ] (type of input)  u NAME=CDATA (key in submitted form)  u VALUE=CDATA (value of input)  u CHECKED (check radio button or checkbox)  u SIZE=CDATA (suggested number of characters for text input)  u MAXLENGTH=Number (maximum number of characters for text input)  u SRC=URI (source for image)  u ALT=CDATA (alternate text for image input)  u USEMAP=URI (client-side image map)  u ALIGN=[ top | middle | bottom | left | right ] (alignment of image input)  u DISABLED (disable element)  u READONLY (prevent changes)  u ACCEPT=ContentTypes (media types for file upload)  u ACCESSKEY=Character (shortcut key)  u TABINDEX=Number (position in tabbing order)  u ONFOCUS=Script (element received focus)  u ONBLUR=Script (element lost focus)  u ONSELECT=Script (element text selected)  u ONCHANGE=Script (element value changed)  u common attributes
Contents Empty
Contained in Block-level elements, inline elements except BUTTON

The INPUT element defines a form control for the user to enter input. While INPUT is most useful within a FORM, HTML 4.0 allows INPUT in any block-level or inline element other than BUTTON. However, Netscape Navigator will not display any INPUT elements outside of a FORM.

When a form is submitted, the current value of each INPUT element within the FORM is sent to the server as name/value pairs. The INPUT element's NAME attribute provides the name used. The value sent depends on the type of form control and on the user's input.

The type of form control defined by INPUT is given by the TYPE attribute. The default TYPE is text, which provides a single-line text input field. The VALUE attribute specifies the initial value for the text field. The SIZE and MAXLENGTH attributes suggest the number of characters and maximum number of characters, respectively, of the text field.

While the MAXLENGTH attribute can be an effective guide to the user, authors should not depend on the enforcement of a maximum number of characters by the client. A user could copy the HTML document, remove the MAXLENGTH attribute, and submit the form. Thus authors of form handlers should ensure that any necessary input length checks are repeated on the server-side.

The password input type is a variation on the text type. The only difference is that the input characters are masked, typically by a series of asterisks, to protect sensitive information from onlookers. Note, however, that the actual value is transmitted to the server as clear text, so password inputs do not provide sufficient security for credit card numbers or other highly sensitive information.

The following example uses text and password fields with the LABEL element to bind text labels to the INPUT elements:

<P><LABEL ACCESSKEY=U>User name: <INPUT TYPE=text NAME=username SIZE=8 MAXLENGTH=8></LABEL></P>
<P><LABEL ACCESSKEY=P>Password: <INPUT TYPE=password NAME=pw SIZE=12 MAXLENGTH=12></LABEL></P>

The boolean READONLY attribute, new in HTML 4.0 and poorly supported by current browsers, prevents the user from editing the content of the text or password input types. Read-only elements are still submitted with the form. The DISABLED attribute, which applies to all input types but is also poorly supported, disables the control. Disabled elements are read-only elements with the added restrictions that the values are not submitted with the form, the elements cannot receive focus, and the elements are skipped when navigating the document by tabbing.

The radio and checkbox input types provide switches that can be turned on and off by the user. The two types differ in that radio buttons are grouped (by specifying the same NAME attribute on each INPUT) so that only one radio button in a group can be selected at any time. Checkboxes can be checked without changing the state of other checkboxes with the same NAME. The VALUE attribute, required for radio buttons and checkboxes, gives the value of the control when it is checked. The boolean CHECKED attribute specifies that the control is initially checked.

Some browsers require one radio button in a group to be selected at all times. To ensure that an appropriate default choice is made, authors may wish to define one of the radio INPUT elements as CHECKED.

In the following example, only one payment method may be selected by the user since the radio buttons have the same NAME:

<P>Please indicate your method of payment:</P>
<P><LABEL ACCESSKEY=C><INPUT TYPE=radio NAME="payment_method" VALUE="credit card" CHECKED> Credit card</LABEL><BR>
<LABEL ACCESSKEY=D><INPUT TYPE=radio NAME="payment_method" VALUE="debit card"> Debit card</LABEL><BR>
<LABEL ACCESSKEY=M><INPUT TYPE=radio NAME="payment_method" VALUE="money order"> Money order</LABEL></P>

<P><LABEL ACCESSKEY=S><INPUT TYPE=checkbox NAME="send_receipt" VALUE="yes" CHECKED> Send receipt by e-mail</LABEL></P>

The file input type creates a field through which users can upload files from their local computer or network. The VALUE attribute specifies the name of the initial file, but it is typically ignored by browsers as a security precaution. The ACCEPT attribute gives a comma-separated list of media types accepted, allowing the browser to filter out inappropriate files. Current browsers generally ignore the ACCEPT attribute.

A form that includes a file INPUT must specify METHOD=post and ENCTYPE="multipart/form-data" in the <FORM> tag. CGI libraries such as CGI.pm allow simple handling of such forms.

Form-based file upload is unsupported by many currently deployed browsers. Authors should provide alternative methods of input where possible.

The following example allows the user to upload an HTML document for validation:

<FORM METHOD=post ACTION="/cgi-bin/validate.cgi" ENCTYPE="multipart/form-data">
<P>Select an HTML document to upload and validate. If your browser does not support form-based file upload, use one of our <A HREF="methods.html">alternate methods of validation</A>.</P>
<P><INPUT TYPE=file NAME="html_file" ACCEPT="text/html"></P>
<P><INPUT TYPE=submit VALUE="Validate it!"></P>
</FORM>

The hidden input type allows authors to include form data without having it rendered to the user. This is particularly useful in form applications that span several HTML documents; user input can be carried from form to form by hidden INPUTs. Some generalized CGI scripts use hidden INPUTs to define variables for the script, as in the following example, which defines a recipient and subject for the e-mailed contents of a form:

<INPUT TYPE=hidden NAME=recipient VALUE="liam@htmlhelp.com">
<INPUT TYPE=hidden NAME=subject VALUE="Feedback on your HTML Reference">

Note that the fields are "hidden" in the sense that they are not rendered by the browser. Anyone can still view the HTML document's source to find the "hidden" fields.

The TYPE value reset defines a button by which the user can reset the form to its initial values. The optional VALUE attribute of a reset button overrides the browser's default text for the button.

The submit input type defines a button for submitting the form. As with reset, the optional VALUE attribute provides the text of the button. The presence of the NAME attribute will cause the browser to send a name/value pair for the submit button if it is used to submit the form. This allows authors to provide multiple submit buttons and have the form handler take a different action depending on the submit button used.

The image input type specifies a graphical submit button. The SRC attribute must be included to specify the URI of the image. The ALT attribute should be used to give replacement text for those not loading images. ALT is a new addition in HTML 4.0; many browsers rely on either the NAME or VALUE attribute as alternate text, so authors should use all three attributes for the same purpose where possible. The topic of graphical submit buttons for text users is discussed in detail in the article INPUT TYPE=IMAGE for text users?.

When the graphical submit button is clicked, the coordinates of the click are sent with the form submission as name.x=x-value and name.y=y-value where name is the value of the NAME attribute, x-value is the click's pixels from the left of the image, and y-value is the click's pixels from the top of the image. The USEMAP attribute combined with TYPE=image defines a client-side image map that can be used with client-side scripting, but this method is poorly supported. The USEMAP attribute gives the URI of the defining MAP.

The deprecated ALIGN attribute specifies the alignment of the graphical submit button. The values top, middle, and bottom specify the button's position with respect to surrounding content on its left and right. The values left and right specify a floating button; the image is placed at the left or right margin and content flows around it. To place content below the button, use <BR CLEAR=left|right|all> as appropriate.

The vertical-align and float properties of Cascading Style Sheets provide more flexible methods of aligning buttons.

The input type button specifies a push button for use with client-side scripting. The VALUE attribute gives the text label of the button. The ONCLICK attribute is typically used to define the action taken when the button is activated. An example follows:

<INPUT TYPE=button VALUE="Hide non-strict attributes" ID=toggler ONCLICK="toggle()">

In this example, the toggle() function, which would be defined earlier in a SCRIPT element, will be executed when the button is clicked. Since the button is only useful with client-side scripting enabled, authors should usually output the <INPUT TYPE=button> tag using the scripting language to avoid providing a non-functioning button to some users. A more complete version of the previous example would thus be as follows:

<SCRIPT TYPE="text/javascript">
<!--
  document.write("<INPUT TYPE=button VALUE=\"Hide non-strict attributes\""
                 + "ID=toggler ONCLICK=\"toggle()\">");
// -->
</script>

The BUTTON element allows richer labels for submit, reset, and push buttons, but a lack of browser support makes INPUT a more reliable choice at this time.

The ACCESSKEY and TABINDEX attributes apply to all input types except hidden. ACCESSKEY specifies a single Unicode character as a shortcut key for giving focus to the form control. Authors can set the access key on the INPUT element or the LABEL element associated with it. Entities (e.g. &eacute;) may be used as the ACCESSKEY value.

The TABINDEX attribute specifies a number between 0 and 32767 to indicate the tabbing order of the element. A form control with TABINDEX=0 or no TABINDEX attribute will be visited after any elements with a positive TABINDEX. Among positive TABINDEX values, the lower number receives focus first. In the case of a tie, the element appearing first in the HTML document takes precedence.

The INPUT element also takes a number of attributes to specify client-side scripting actions for various events. In addition to the core events common to most elements, INPUT accepts the following event attributes:

u ONFOCUS, when the element receives focus;

u ONBLUR, when the element loses focus;

u ONSELECT, when text in an input of type text or password is selected;

u ONCHANGE, when the element loses focus and its value has changed since it received focus.

More Information

u INPUT in W3C HTML 4.0 Recommendation

u INPUT in W3C HTML 3.2 Recommendation

u INPUT in HTML 2.0 Standard

u INPUT in WDG HTML 3.2 Reference

u INPUT in Learning HTML 3.2 by Examples

u RFC 1867: Form-based File Upload in HTML

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


SELECT - Option Selector

SELECT - Option Selector

Syntax <SELECT>...</SELECT>
Attribute Specifications u NAME=CDATA (key in submitted form)  u MULTIPLE (allow multiple selections)  u SIZE=Number (number of visible options)  u DISABLED (disable element)  u TABINDEX=Number (position in tabbing order)  u ONFOCUS=Script (element received focus)  u ONBLUR=Script (element lost focus)  u ONCHANGE=Script (element value changed)  u common attributes
Contents One or more OPTGROUP or OPTION elements
Contained in Block-level elements, inline elements except BUTTON

The SELECT element defines a form control for the selection of options. While SELECT is most useful within a FORM, HTML 4.0 allows SELECT in any block-level or inline element other than BUTTON. However, Netscape Navigator will not display any SELECT elements outside of a FORM.

The SELECT element contains one or more OPTGROUP or OPTION elements to provide a menu of choices for the user. Each choice is contained within an OPTION element. Choices can be grouped logically through the OPTGROUP element. SELECT's NAME attribute provides the key sent to the server with the value of the selected option.

By default, the user can only select one option. The boolean MULTIPLE attribute allows the user to select multiple options, which are submitted as separate name/value pairs. The following example uses the MULTIPLE attribute to allow the selection of one or more options:

<P>Select one or more sections to search:
<SELECT NAME=sections MULTIPLE>
<OPTION>Web Authoring Reference</OPTION>
<OPTION>FAQ Archives</OPTION>
<OPTION>Design Elements</OPTION>
<OPTION>Tools</OPTION>
<OPTION>Feature Article</OPTION>
</SELECT>
</P>

The boolean DISABLED attribute, new in HTML 4.0 and poorly supported by current browsers, makes the SELECT element unavailable. The user is unable to edit the disabled selection, no value is submitted with the form, the SELECT element cannot receive focus, and the element is skipped when navigating the document by tabbing.

The TABINDEX attribute specifies a number between 0 and 32767 to indicate the tabbing order of the element. A SELECT element with TABINDEX=0 or no TABINDEX attribute will be visited after any elements with a positive TABINDEX. Among positive TABINDEX values, the lower number receives focus first. In the case of a tie, the element appearing first in the HTML document takes precedence.

The SIZE attribute of SELECT hints that visual browsers should display the element as a list box with the specified number of options visible at any time. A scroll bar would allow access to any non-visible options. The SIZE attribute is especially useful in SELECT elements with numerous OPTIONs and multiple selections allowed. In such a situation, some visual browsers will render the entire list in one large box without scrolling; a suitable SIZE attribute helps such browsers give a more appropriate presentation.

The SELECT element also takes a number of attributes to specify client-side scripting actions for various events. In addition to the core events common to most elements, SELECT accepts the following event attributes:

u ONFOCUS, when the element receives focus;

u ONBLUR, when the element loses focus;

u ONCHANGE, when the element loses focus and its value has changed since it received focus.

More Information

u SELECT in W3C HTML 4.0 Recommendation

u SELECT in W3C HTML 3.2 Recommendation

u SELECT in HTML 2.0 Standard

u SELECT in WDG HTML 3.2 Reference

u SELECT in Learning HTML 3.2 by Examples

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


OPTION - Menu Option

OPTION - Menu Option

Syntax <OPTION>...</OPTION>
Attribute Specifications u VALUE=CDATA (value of option)  u SELECTED (choice initially selected)  u DISABLED (disable choice)  u LABEL=Text (option label)  u common attributes
Contents Plain text (including entities)
Contained in SELECT, OPTGROUP

The OPTION element defines a menu choice within a SELECT menu. The value of the option, sent with a submitted form, is specified with the VALUE attribute. In the absence of a VALUE attribute, the value is the content of the OPTION element.

The boolean SELECTED attribute defines the OPTION to be initially selected. A SELECT element can only have one OPTION selected at any time unless the MULTIPLE attribute is present on SELECT.

If the SELECT element does not use the MULTIPLE or SIZE attributes, some browsers will automatically (and incorrectly) select an option. To ensure that a suitable option is selected, authors may wish to use the SELECTED attribute on an OPTION. If no option is a suitable default, consider using a dummy option, as in the following example:

<SELECT NAME="marital_status">
<OPTION SELECTED VALUE="">Select...</OPTION>
<OPTION>Single</OPTION>
<OPTION>Married</OPTION>
<OPTION>Separated</OPTION>
<OPTION>Divorced</OPTION>
<OPTION>Widowed</OPTION>
</SELECT>

The boolean DISABLED attribute, new in HTML 4.0 and poorly supported by current browsers, makes the OPTION element unavailable. A disabled option cannot be selected by the user and is never submitted with the form.

The LABEL attribute specifies the option label presented to the user. This defaults to the content of the OPTION element, but the LABEL attribute allows authors to more easily use OPTGROUP without sacrificing compatibility with browsers that do not support option groups. The following example illustrates the technique:

<P>Which Web browser do you use most often?
  <SELECT NAME=browser>
    <OPTGROUP LABEL="Netscape Navigator">
      <OPTION LABEL="4.x or higher">
        Netscape Navigator 4.x or higher
      </OPTION>
      <OPTION LABEL="3.x">Netscape Navigator 3.x</OPTION>
      <OPTION LABEL="2.x">Netscape Navigator 2.x</OPTION>
      <OPTION LABEL="1.x">Netscape Navigator 1.x</OPTION>
    </OPTGROUP>
    <OPTGROUP LABEL="Microsoft Internet Explorer">
      <OPTION LABEL="4.x or higher">
        Microsoft Internet Explorer 4.x or higher
      </OPTION>
      <OPTION LABEL="3.x">Microsoft Internet Explorer 3.x</OPTION>
      <OPTION LABEL="2.x">Microsoft Internet Explorer 2.x</OPTION>
      <OPTION LABEL="1.x">Microsoft Internet Explorer 1.x</OPTION>
    </OPTGROUP>
    <OPTGROUP LABEL="Opera">
      <OPTION LABEL="3.x or higher">Opera 3.x or higher</OPTION>
      <OPTION LABEL="2.x">Opera 2.x</OPTION>
    </OPTGROUP>
    <OPTION>Other</OPTION>
  </SELECT>
</P>

OPTGROUP and OPTION's LABEL attribute were introduced together, so browsers should support both features or neither of them. Supporting browsers will render the preceding example using the LABEL attribute of OPTION to provide just the version number, along with the OPTGROUP's LABEL, which gives the full name of the application. This allows a compact display with cascading menus, but many browsers do not yet support OPTGROUP. These browsers will ignore the OPTGROUP elements and LABEL attributes, providing the full name and version for each choice. Thus authors can fully use OPTGROUP despite its lack of browser support.

More Information

u OPTION in W3C HTML 4.0 Recommendation

u OPTION in W3C HTML 3.2 Recommendation

u OPTION in HTML 2.0 Standard

u OPTION in WDG HTML 3.2 Reference

u OPTION in Learning HTML 3.2 by Examples

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


TEXTAREA - Multi-line Text Input

TEXTAREA - Multi-line Text Input

Syntax <TEXTAREA>...</TEXTAREA>
Attribute Specifications u NAME=CDATA (key in submitted form)  u ROWS=Number (number of rows)  u COLS=Number (number of columns)  u DISABLED (disable element)  u READONLY (prevent changes)  u ACCESSKEY=Character (shortcut key)  u TABINDEX=Number (position in tabbing order)  u ONFOCUS=Script (element received focus)  u ONBLUR=Script (element lost focus)  u ONSELECT=Script (element text selected)  u ONCHANGE=Script (element value changed)  u common attributes
Contents Plain text (including entities)
Contained in Block-level elements, inline elements except BUTTON

The TEXTAREA element defines a form control for the user to enter multi-line text input. While TEXTAREA is most useful within a FORM, HTML 4.0 allows TEXTAREA in any block-level or inline element other than BUTTON. However, Netscape Navigator will not display any TEXTAREA elements outside of a FORM.

The initial value of the TEXTAREA is provided as the content of the element and must not contain any HTML tags. When a form is submitted, the current value of any TEXTAREA element within the FORM is sent to the server as a name/value pair. The TEXTAREA element's NAME attribute provides the name used.

The required ROWS and COLS attributes specify the number of visible rows and columns, respectively, in a visual browser. These attributes provide a guide for the user rather than a restriction; browsers allow an unlimited amount of text input in theory, though in practice many browsers limit the contents of a TEXTAREA to 32 or 64 kilobytes. Author restrictions on the amount of data entered should be enforced by the CGI script or Java servlet handling the form.

The boolean READONLY attribute, new in HTML 4.0 and poorly supported by current browsers, prevents the user from editing the content of the TEXTAREA. Read-only elements are still submitted with the form. The DISABLED attribute, also poorly supported, disables the TEXTAREA. Disabled elements are read-only elements with the added restrictions that the values are not submitted with the form, the elements cannot receive focus, and the elements are skipped when navigating the document by tabbing.

The ACCESSKEY attribute specifies a single Unicode character as a shortcut key for giving focus to the TEXTAREA. Authors can set the access key on the TEXTAREA element or the LABEL element associated with it. Entities (e.g. &eacute;) may be used as the ACCESSKEY value.

The TABINDEX attribute specifies a number between 0 and 32767 to indicate the tabbing order of the element. A TEXTAREA with TABINDEX=0 or no TABINDEX attribute will be visited after any elements with a positive TABINDEX. Among positive TABINDEX values, the lower number receives focus first. In the case of a tie, the element appearing first in the HTML document takes precedence.

The TEXTAREA element also takes a number of attributes to specify client-side scripting actions for various events. In addition to the core events common to most elements, TEXTAREA accepts the following event attributes:

u ONFOCUS, when the element receives focus;

u ONBLUR, when the element loses focus;

u ONSELECT, when text in the element is selected;

u ONCHANGE, when the element loses focus and its value has changed since it received focus.

More Information

u TEXTAREA in W3C HTML 4.0 Recommendation

u TEXTAREA in W3C HTML 3.2 Recommendation

u TEXTAREA in HTML 2.0 Standard

u TEXTAREA in WDG HTML 3.2 Reference

u TEXTAREA in Learning HTML 3.2 by Examples

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


A - Anchor

A - Anchor

Syntax <A>...</A>
Attribute Specifications u HREF=URI (hypertext reference)  u NAME=CDATA (named link destination)  u REL=LinkTypes (relationship to link)  u REV=LinkTypes (relationship from link)  u TYPE=ContentType (content-type of link)  u TARGET=FrameTarget (frame to render link in)  u HREFLANG=LanguageCode (language of link)  u CHARSET=Charset (character encoding of link)  u ACCESSKEY=Character (shortcut key)  u TABINDEX=Number (position in tabbing order)  u SHAPE=[ rect | circle | poly | default ] (client-side image map)  u COORDS=Coords (client-side image map)  u ONFOCUS=Script (element received focus)  u ONBLUR=Script (element lost focus)  u common attributes
Contents Inline elements except A
Contained in Block-level elements, inline elements except A

The A element denotes an anchor--a hypertext link or the destination of a link. The HREF attribute specifies a hypertext link to another resource, such as an HTML document or a JPEG image. Examples:

u <A HREF="album.html">My photo album</A>

u <A HREF="../images/me.jpg">Picture of me</A>

u <A href="http://www.htmlhelp.com/sounds/auldlang.mid" TYPE="audio/midi" ACCESSKEY=A>Auld Lang Syne (5 kB MIDI)</A>

u <A HREF="section2.html" TARGET="content" TITLE="Elements of the HEAD" REL=next>Section 2</A>

u <A HREF="mailto:liam@htmlhelp.com" TITLE="Feedback on HTML 4.0 Reference">liam@htmlhelp.com</A>

u <A HREF="http://www.htmlhelp.com/" TARGET="_top">Web Design Group</A>

u <A HREF="http://babel.alis.com:8080/langues/iso639.zh.htm" CHARSET="big5" HREFLANG=zh>ISO 639</A>

The value of the HREF attribute is the URI of the link. The TYPE attribute can be used to specify the Internet media type of the link, allowing browsers to avoid fetching a resource that they cannot handle.

The TITLE attribute can be used to briefly describe the contents of the link and is rendered as a "tooltip" by some visual browsers. With mailto links, some browsers use the TITLE attribute value as a subject for the e-mail message.

The content of an A element used as a link should be as context-free as possible. In other words, a user should be able to pull all A elements from a document and still have an idea what lies behind each link. Link text that contains Click here or simply here is extremely bad form.

The TARGET attribute is used with frames to specify in which frame the link should be rendered. If no frame with such a name exists, the link is rendered in a new window unless overridden by the user. Special frame names begin with an underscore:

u _blank renders the link in a new, unnamed window

u _self renders the link in the current frame (useful for overriding a BASE TARGET)

u _parent renders the link in the immediate FRAMESET parent

u _top renders the link in the full, unframed window

The optional HREFLANG and CHARSET attributes give the language and character encoding, respectively, of the link. The language should be specified according to RFC 1766; examples include en for English, en-US for American English, and ja for Japanese. Examples of character encodings include ISO-8859-1, SHIFT_JIS, and UTF-8.

The ACCESSKEY attribute specifies a single Unicode character as a shortcut key for following the link. Entities (e.g. &eacute;) may be used as the ACCESSKEY value.

The TABINDEX attribute specifies a number between 0 and 32767 to indicate the tabbing order of the element. An anchor with TABINDEX=0 or no TABINDEX attribute will be visited after any elements with a positive TABINDEX. Among positive TABINDEX values, the lower number receives focus first. In the case of a tie, the element appearing first in the HTML document takes precedence.

The REL and REV attributes define relationships between an anchor and the linked resource. REL defines a link relationship from the current document to the linked document while REV defines a relationship in the opposite direction. For example,

<A HREF="foo.html" REL=glossary>...</A>

indicates that foo.html is a glossary for the current document while

<A HREF="bar.html" REV=subsection>...</A>

indicates that the current document is a subsection of bar.html. The value of the REL and REV attributes is a space-separated list of link types.

The NAME attribute defines a destination for a link. For example, a document containing

<H1><A NAME=foo>My Heading</A></H1>

defines a link destination named "foo" at the indicated heading. One could then use HREF="#foo" in an A element within the same document or HREF="somedoc.html#foo" from within another document.

An A element cannot contain another A element, so one must be careful that named anchors do not contain link anchors. Authors can use both the NAME and HREF attributes in a single A element to avoid this problem.

HTML 4.0's ID attribute is intended to eliminate the need for A NAME. The ID attribute can be used with almost any element to define a link destination, so that the following could be used in place of the previous example:

<H1 ID=foo>My heading</H1>

However, browser support for ID link destinations is very poor, so A NAME will be needed for quite awhile.

NAME and ID values must be unique in any document, and different values must differ by more than just the case. Values must begin with a letter in the range A-Z or a-z, and may be followed by A-Z, a-z, 0-9, hyphens, underscores, colons, or periods. When linking to a named anchor, the name is treated as case sensitive.

The SHAPE and COORDS attributes of A can be used to create client-side image maps via the OBJECT element. The default SHAPE value is rect, which defines a rectangular region using COORDS="left, top, right, bottom". Other SHAPE values are

u default, which specifies the entire image;

u circle, which specifies a circular region using COORDS="center-x, center-y, radius";

u poly, which specifies a polygonal region using COORDS="x1, y1, x2, y2, ..., xN, yN".

Coordinate values are relative to the top left corner of the object and may be expressed as pixels or percentages. A percentage radius value for circular regions is calculated relative to the smaller of the object's width and height. If two or more regions overlap, the earliest specified region takes precedence.

In addition to the core events common to most elements, A accepts the following event attributes for client-side scripting:

u ONFOCUS, when the link receives focus;

u ONBLUR, when the link loses focus.

More Information

u A in W3C HTML 4.0 Recommendation

u A in W3C HTML 3.2 Recommendation

u A in HTML 2.0 Standard

u A in WDG HTML 3.2 Reference

u A in Learning HTML 3.2 by Examples

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


APPLET - Java Applet

APPLET - Java Applet

Syntax <APPLET>...</APPLET>
Attribute Specifications u CODE=CDATA (class file)  u CODEBASE=URI (base URI for class files)  u WIDTH=Length (applet width)  u HEIGHT=Length (applet height)  u ARCHIVE=CDATA (archive files)  u OBJECT=CDATA (serialized applet)  u NAME=CDATA (name for inter-applet communication)  u ALT=Text (alternate text)  u ALIGN=[ top | middle | bottom | left | right ] (applet alignment)  u HSPACE=Pixels (horizontal gutter)  u VSPACE=Pixels (vertical gutter)  u common attributes
Contents PARAM elements followed by block-level elements and/or inline elements
Contained in Inline elements, block-level elements except PRE

The APPLET element is used to embed Java applets. It has been deprecated in HTML 4.0 in favor of the more generalized OBJECT element. However, since the few browsers that support OBJECT do so with significant bugs, APPLET is currently a more reliable method of embedding Java applets.

APPLET's CODE attribute specifies the name of the class file that contains the compiled Applet subclass. The value is relative to the URI specified in the CODEBASE attribute, or to the HTML document's base URI if the CODEBASE attribute is not given.

The required WIDTH and HEIGHT attributes define the dimensions of the applet. The value may be given in pixels or as a percentage of the parent element's width or height.

The ALT attribute can be used to give alternate text for browsers that recognize the APPLET element but do not support Java or do not have Java enabled. Authors can also give alternate content between the start and end tags of the APPLET element--a better method than using the ALT attribute since it allows authors to include HTML markup in the alternate content and also works with pre-HTML 3.2 browsers that do not support APPLET.

An APPLET may contain PARAM elements to define applet-specific parameters. PARAM elements should be specified before any other content of the APPLET element. In the following example, a decorative Java applet takes two parameters. The APPLET contains an animated GIF as an alternative for non-Java browsers.

<APPLET CODE="Animate.class" WIDTH=100 HEIGHT=100>
<PARAM NAME=img1 VALUE="/images/1.jpg">
<PARAM NAME=img2 VALUE="/images/2.jpg">
<IMG SRC="animation.gif" ALT="" WIDTH=100 HEIGHT=100>
</APPLET>

The ARCHIVE attribute can specify a comma-separated list of archived files (either absolute URIs or URIs relative to the CODEBASE), allowing the browser to download many files with a single connection and hence decreasing the total download time. The standard archive format for Java files is JAR. JAR files can be created with the jar tool included with the Java Development Kit 1.1 and up.

Note that some browsers do not support the ARCHIVE attribute, so all necessary files should be available unarchived as well. Other browsers only support a single URI as the ARCHIVE value.

The OBJECT attribute specifies a serialized (saved) representation of an applet. The CODE attribute should not be used if and only if the OBJECT attribute is specified. When the applet is deserialized, its init() method is not invoked, but its start() method is. Sun recommends restraint in using this poorly supported feature.

The ALIGN attribute specifies the alignment of the applet. The values top, middle, and bottom specify the applet's position with respect to surrounding content on its left and right.

ALIGN=middle aligns the center of the applet with the current baseline. To center the applet horizontally on the page, place the applet in a centered block, e.g.,

<P ALIGN=center><APPLET CODE="Game.class" WIDTH=300 HEIGHT=100></APPLET></P>

The other ALIGN values, left and right, specify a floating applet; the applet is placed at the left or right margin and content flows around it. To place content below the applet, use <BR CLEAR=left|right|all> as appropriate.

The vertical-align and float properties of Cascading Style Sheets provide more flexible methods of aligning applets.

The HSPACE and VSPACE attributes allow an author to suggest horizontal gutters and vertical gutters, respectively, around the applet. The value must be in pixels and applies to both sides of the applet. Style sheets provide more flexibility in specifying the space around applets.

More Information

u APPLET in W3C HTML 4.0 Recommendation

u APPLET in W3C HTML 3.2 Recommendation

u APPLET in WDG HTML 3.2 Reference

u APPLET in Learning HTML 3.2 by Examples

u The APPLET Tag (JDK 1.1 Documentation)

u The Java Tutorial

u Using the <APPLET> Tag

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


BASEFONT - Base Font Change

BASEFONT - Base Font Change

Syntax <BASEFONT>
Attribute Specifications u SIZE=CDATA (font size adjustment)  u COLOR=Color (font color adjustment)  u FACE=CDATA (font face adjustment)  u ID=ID (unique ID)
Contents Empty
Contained in Inline elements, block-level elements except PRE

The BASEFONT element, deprecated in HTML 4.0 in favor of style sheets, allows authors to suggest rudimentary font changes. Use of the BASEFONT element brings the same usability and accessibility problems as FONT, as discussed in the article What's Wrong With FONT?

Unlike FONT, BASEFONT's changes affect the base font, and so apply to all content following the BASEFONT element except for headings. However, most browsers fail to apply changes in the base font size and color to TABLEs.

BASEFONT's required SIZE attribute specifies the font size to use on a browser-dependent scale of 1 to 7, with the default being 3.

The poorly supported COLOR and FACE attributes suggest a font color and face, respectively. Style sheets are better supported and more flexible than BASEFONT's COLOR and FACE attributes.

More Information

u BASEFONT in W3C HTML 4.0 Recommendation

u BASEFONT in W3C HTML 3.2 Recommendation

u BASEFONT in WDG HTML 3.2 Reference

u BASEFONT in Learning HTML 3.2 by Examples

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


FONT - Font Change

FONT - Font Change

Syntax <FONT>...</FONT>
Attribute Specifications u SIZE=CDATA (font size adjustment)  u COLOR=Color (font color adjustment)  u FACE=CDATA (font face adjustment)  u core attributes  u internationalization attributes
Contents Inline elements
Contained in Inline elements, block-level elements except PRE

The FONT element, deprecated in HTML 4.0 in favor of style sheets, allows authors to suggest rudimentary font changes. Use of the FONT element brings numerous usability and accessibility problems, as discussed in the article What's Wrong With FONT?

The least harmful use of the FONT element is in suggesting relative changes in font size with <FONT SIZE="+1"> or <FONT SIZE="-1">. These tags increment or decrement the font size relative to the size specified in the BASEFONT element, or relative to a base size of 3 if no BASEFONT element is used. Sizes are based on a seven-point scale (1..7) that is browser dependent.

While authors can specify SIZE values such as -2 and +3, as well as absolute values such as 1, these kinds of changes are strongly discouraged due to the sensitivity some users have to different font sizes. While a value like -2 may look right to you with your eyesight and user settings, it could easily be unreadable to a user with different eyesight and user settings.

The COLOR attribute suggests a text color. While most browsers allow users to override author color changes, the widely used Netscape Navigator 2.x, 3.x, and 4.x do not override colors specified with FONT. This makes the COLOR attribute very dangerous from an accessibility point of view.

Authors often use the COLOR attribute as a form of emphasis or to indicate a heading. In these cases, use of structural HTML (e.g., STRONG, H1) along with a style sheet provides a more flexible, accessible document.

The FACE attribute gives a comma-separated list of font faces in which to display text. The fonts are listed in order of preference, so that if the browser does not have the first font listed, it will try the second, then the third, and so on.

The FONT element is an inline element, meaning that it cannot contain block-level elements such as P and TABLE. Again, style sheets provide much more flexibility in suggesting font styles.

More Information

u FONT in W3C HTML 4.0 Recommendation

u FONT in W3C HTML 3.2 Recommendation

u FONT in WDG HTML 3.2 Reference

u FONT in Learning HTML 3.2 by Examples

u What's Wrong With FONT?

u <FONT FACE> considered harmful

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


AREA - Image Map Region

AREA - Image Map Region

Syntax <AREA>
Attribute Specifications u SHAPE=[ rect | circle | poly | default ] (shape of region)  u COORDS=Coords (coordinates of region)  u HREF=URI (linked resource)  u TARGET=FrameTarget (frame to render link in)  u NOHREF (inactive region)  u ALT=Text (alternate text)  u TABINDEX=Number (position in tabbing order)  u ONFOCUS=Script (region received focus)  u ONBLUR=Script (region lost focus)  u common attributes
Contents Empty
Contained in MAP

The AREA element defines a map region in a client-side image map. Each map region is a piece of the image with a different action when clicked.

The SHAPE and COORDS attributes of AREA specify what part of the image is included in the region. The default SHAPE value is rect, which defines a rectangular region using COORDS="left, top, right, bottom". Other SHAPE values are

u default, which specifies the entire image;

u circle, which specifies a circular region using COORDS="center-x, center-y, radius";

u poly, which specifies a polygonal region using COORDS="x1, y1, x2, y2, ..., xN, yN".

Coordinate values are relative to the top left corner of the object and may be expressed as pixels or percentages. A percentage radius value for circular regions is calculated relative to the smaller of the object's width and height. If two or more regions overlap, the earliest specified region takes precedence.

The HREF attribute specifies a link to another resource, such as an HTML document or a JPEG image. The TITLE attribute can be used to briefly describe the contents of the link and is rendered as a "tooltip" by some visual browsers. The boolean NOHREF attribute indicates that the region has no link.

The required ALT attribute provides alternate text for those not loading images. Effective ALT text should generally give the function of the map region rather than a description of the region. For example, ALT="WDG Home" or ALT="Web Design Group" would be more appropriate than ALT="WDG Logo" for a map region whose link went to the WDG home page. Good ALT text is crucial to the document's accessibility for the significant portion of users who do not load images.

The TARGET attribute is used with frames to specify in which frame the link should be rendered. If no frame with such a name exists, the link is rendered in a new window unless overridden by the user. Special frame names begin with an underscore:

u _blank renders the link in a new, unnamed window

u _self renders the link in the current frame (useful for overriding a BASE TARGET)

u _parent renders the link in the immediate FRAMESET parent

u _top renders the link in the full, unframed window

The ACCESSKEY attribute specifies a single Unicode character as a shortcut key for following the link. Entities (e.g. &eacute;) may be used as the ACCESSKEY value.

The TABINDEX attribute specifies a number between 0 and 32767 to indicate the tabbing order of the map region. A region with TABINDEX=0 or no TABINDEX attribute will be visited after any elements with a positive TABINDEX. Among positive TABINDEX values, the lower number receives focus first. In the case of a tie, the element appearing first in the HTML document takes precedence.

In addition to the core events common to most elements, AREA accepts the following event attributes for client-side scripting:

u ONFOCUS, when the region receives focus;

u ONBLUR, when the region loses focus.

More Information

u AREA in W3C HTML 4.0 Recommendation

u AREA in W3C HTML 3.2 Recommendation

u AREA in WDG HTML 3.2 Reference

u AREA in Learning HTML 3.2 by Examples

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


PARAM - Object Parameter

PARAM - Object Parameter

Syntax <PARAM>
Attribute Specifications u NAME=CDATA (property name)  u VALUE=CDATA (property value)  u VALUETYPE=[ data | ref | object ] (type of value)  u TYPE=ContentType (content-type of value resource)  u ID=ID
Contents Empty
Contained in APPLET, OBJECT

The PARAM element provides parameters for the OBJECT and APPLET elements. An OBJECT or APPLET may contain any number of PARAM elements prior to the alternate content that is also contained within the OBJECT or APPLET element.

The required NAME attribute of PARAM gives the name of the parameter while the VALUE attribute gives the parameter's value. The parameters recognized are specific to the kind of object being embedded or to the plug-in that renders the embedded object. For example, a clock applet may accept parameters to specify the style of the clock and the colors to use:

<OBJECT CLASSID="java:Clock.class" CODETYPE="application/java" WIDTH=100 HEIGHT=100 TITLE="A real live clock!" STANDBY="Do you know what time it is?">
<PARAM NAME=TYPE VALUE=ANALOG>
<PARAM NAME=BGCOLOR VALUE=WHITE>
<PARAM NAME=FGCOLOR VALUE=NAVY>
</OBJECT>

Note that the PARAM elements used in the preceding example would not change if the APPLET element were used in place of OBJECT.

Objects such as videos, audio clips, and VRML worlds are typically handled by browser plug-ins. Each plug-in recognizes certain parameters, which can make choosing parameters difficult when the author does not know which plug-in the user has. However, unsupported parameters should be safely ignored. The following example uses parameters specific to the QuickTime movie plug-in as well as parameters specific to the LiveAudio audio plug-in:

<OBJECT DATA="mlk.mov" TYPE="video/quicktime" TITLE="Martin Luther King's &quot;I Have a Dream&quot; speech" WIDTH=150 HEIGHT=150>
<PARAM NAME=pluginspage VALUE="http://quicktime.apple.com/">
<PARAM NAME=autoplay VALUE=true>
<OBJECT DATA="mlk.wav" TYPE="audio/x-wav" TITLE="Martin Luther King's &quot;I Have a Dream&quot; speech">
<PARAM NAME=autostart VALUE=true>
<PARAM NAME=hidden VALUE=true>
<A HREF="mlk.html">Full text of Martin Luther King's "I Have a Dream" speech</A>
</OBJECT>
</OBJECT>

Note that only the parameters specified within the OBJECT and prior to the alternate content are passed onto the plug-in, so that the pluginspage and autoplay parameters are used if the QuickTime movie is played while the autostart and hidden parameters are used if the audio clip is played.

The VALUETYPE parameter of PARAM designates the type of the VALUE attribute. The default value for VALUETYPE is data, which indicates that the VALUE attribute contains a string.

The ref value for VALUETYPE indicates that the VALUE attribute contains a URI where run-time values are stored. The Internet media type of the resource is specified by the TYPE attribute. The following example uses values with VALUETYPE=ref to specify the location of images to animate and a sound to play during the animation:

<OBJECT CLASSID="java:Animator.class" CODETYPE="application/java" WIDTH=200 HEIGHT=300 TITLE="Wedding Photos">
<PARAM NAME=IMAGE1 VALUE="images/wedding/bride.jpg" VALUETYPE=ref TYPE="image/jpeg">
<PARAM NAME=IMAGE2 VALUE="images/wedding/groom.jpg" VALUETYPE=ref TYPE="image/jpeg">
<PARAM NAME=IMAGE3 VALUE="images/wedding/cake.jpg" VALUETYPE=ref TYPE="image/jpeg">
<PARAM NAME=SOUND VALUE="http://www.htmlhelp.com/sounds/weddingmarch.au" VALUETYPE=ref TYPE="audio/basic">
</OBJECT>

The URI specified by VALUE is passed to the object without being resolved to a full URL. In the preceding example, the Java class would be responsible for resolving and fetching the contents of partial URIs like "images/wedding/cake.jpg".

VALUETYPE also takes an object value, for use when a VALUE attribute specifies an identifier of a separate OBJECT in the document. The following example features a hypothetical application for interactively walking through the frames of an animated GIF. The GIF is loaded in a separate OBJECT from the application that uses it.

<OBJECT DECLARE ID=mygif DATA="animation.gif" TYPE="image/gif">
</OBJECT>
<OBJECT CLASSID="framepicker">
<PARAM NAME=image VALUE="#mygif" VALUETYPE=object>
<IMG SRC="animation.gif" ALT="[Example of an animated GIF]">
</OBJECT>

More Information

u PARAM in W3C HTML 4.0 Recommendation

u PARAM in W3C HTML 3.2 Recommendation

u PARAM in WDG HTML 3.2 Reference

u PARAM in Learning HTML 3.2 by Examples

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


SUB - Subscript

SUB - Subscript

Syntax <SUB>...</SUB>
Attribute Specifications u common attributes
Contents Inline elements
Contained in Inline elements, block-level elements

The SUB element is used for subscripts. Since SUB is inherently presentational, it should not be relied upon to express a given meaning. However, it can be useful for chemical formulas and mathematical indices, where the subscript presentation is helpful but not required. For example:

u Chemical formulas include H<SUB>2</SUB>O (water) and C<SUB>21</SUB>H<SUB>27</sub>NO (methadone).

u Let <VAR>x</VAR> = <VAR>x<SUB>1</SUB></VAR> + <VAR>x<SUB>2</SUB></VAR> + ... + <VAR>x<SUB>n</SUB></VAR>.

More Information

u SUB in W3C HTML 4.0 Recommendation

u SUB in W3C HTML 3.2 Recommendation

u SUB in WDG HTML 3.2 Reference

u SUB in Learning HTML 3.2 by Examples

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


SUP - Superscript

SUP - Superscript

Syntax <SUP>...</SUP>
Attribute Specifications u common attributes
Contents Inline elements
Contained in Inline elements, block-level elements

The SUP element is used for superscripts. Since SUP is inherently presentational, it should not be relied upon to express a given meaning. However, it can be useful for mathematical exponents where the context implies the meaning of the exponent, as well as other cases where superscript presentation is helpful but not required. For example:

u The rent is due on the 1<SUP>st</SUP> of each month.

u An example of a quadratic polynomial is <STRONG>3<VAR>x</VAR><SUP CLASS=exponent>2</SUP> + 5<VAR>x</VAR> - 7</STRONG>.

The following two examples are ambiguous when presented on a browser incapable of superscript text:

u 2<SUP CLASS=exponent>4</SUP> = 16

u sin<SUP CLASS=exponent>2</SUP><VAR>x</VAR> + cos<SUP CLASS=exponent>2</SUP><VAR>x</VAR> = 1

There is no simple solution for this problem. One could use notation such as 2^4 to represent "two raised to the exponent four." If it gains browser support, MathML should provide a more suitable solution in the future.

More Information

u SUP in W3C HTML 4.0 Recommendation

u SUP in W3C HTML 3.2 Recommendation

u SUP in WDG HTML 3.2 Reference

u SUP in Learning HTML 3.2 by Examples

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


CITE - Citation

CITE - Citation

Syntax <CITE>...</CITE>
Attribute Specifications u common attributes
Contents Inline elements
Contained in Inline elements, block-level elements

The CITE element is used to markup citations, such as titles of magazines or newspapers, ship names, references to other sources, and quotation attributions. Visual browsers typically render CITE as italic text, but authors can suggest a rendering using style sheets. Since CITE is a structural element, it carries meaning, making it preferable to font style elements such as I when marking up citations.

Example:

<CITE>The Toronto Star</CITE> gave its review of the movie <CITE>Titanic</CITE> yesterday.

More Information

u CITE in W3C HTML 4.0 Recommendation

u CITE in W3C HTML 3.2 Recommendation

u CITE in HTML 2.0 Standard

u CITE in WDG HTML 3.2 Reference

u CITE in Learning HTML 3.2 by Examples

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


CODE - Computer Code

CODE - Computer Code

Syntax <CODE>...</CODE>
Attribute Specifications u common attributes
Contents Inline elements
Contained in Inline elements, block-level elements

The CODE element denotes computer code. Visual browsers typically render CODE as monospaced text, but authors can suggest a rendering using style sheets. Since CODE is a structural element, it carries meaning, making it preferable to font style elements such as TT when marking up computer code.

Since spacing is often important when presenting computer code, the PRE element can be useful as a container for CODE elements. When used within other containers, a CODE element has multiple spaces collapsed. The following example uses CODE within PRE:

<PRE><CODE>
class HelloWorld {
  public static void main(String[] args) {
    System.out.println("Hello World!");
  }
}
</CODE></PRE>

More Information

u CODE in W3C HTML 4.0 Recommendation

u CODE in W3C HTML 3.2 Recommendation

u CODE in HTML 2.0 Standard

u CODE in WDG HTML 3.2 Reference

u CODE in Learning HTML 3.2 by Examples

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


DFN - Defined Term

DFN - Defined Term

Syntax <DFN>...</DFN>
Attribute Specifications u common attributes
Contents Inline elements
Contained in Inline elements, block-level elements

The DFN element denotes the defining instance of a term. Visual browsers typically render DFN as italic text, but authors can suggest a rendering using style sheets. Since DFN is a structural element, it carries meaning, making it preferable to font style elements such as I when marking up the defining instance of a term.

Netscape Navigator does not support the DFN element. In most cases, the lack of support is not a significant problem; concerned authors could nest the DFN element within an I element or another font style element.

More Information

u DFN in W3C HTML 4.0 Recommendation

u DFN in W3C HTML 3.2 Recommendation

u DFN in WDG HTML 3.2 Reference

u DFN in Learning HTML 3.2 by Examples

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


KBD - Text to be Input

KBD - Text to be Input

Syntax <KBD>...</KBD>
Attribute Specifications u common attributes
Contents Inline elements
Contained in Inline elements, block-level elements

The KBD element denotes text to be entered by the user. Visual browsers typically render KBD as monospaced text, but authors can suggest a rendering using style sheets. Since KBD is a structural element, it carries meaning, making it preferable to font style elements such as TT when marking up text to be entered by the user.

Example:

<P>If the question does not apply to you, enter <KBD>N/A</KBD>.

More Information

u KBD in W3C HTML 4.0 Recommendation

u KBD in W3C HTML 3.2 Recommendation

u KBD in HTML 2.0 Standard

u KBD in WDG HTML 3.2 Reference

u KBD in Learning HTML 3.2 by Examples

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


SAMP - Sample Output

SAMP - Sample Output

Syntax <SAMP>...</SAMP>
Attribute Specifications u common attributes
Contents Inline elements
Contained in Inline elements, block-level elements

The SAMP element denotes sample output, such as from a program or script. Visual browsers typically render SAMP as monospaced text, but authors can suggest a rendering using style sheets. Since SAMP is a structural element, it carries meaning, making it preferable to font style elements such as TT when marking up sample output.

Example:

<P>When an undefined element is used in an HTML document, a validator will give an error like the following:</P>
<P><SAMP>C:\SP\BIN\NSGMLSU.EXE:test.html:4:7:E: element "FOOBAR" undefined</SAMP></P>

More Information

u SAMP in W3C HTML 4.0 Recommendation

u SAMP in W3C HTML 3.2 Recommendation

u SAMP in HTML 2.0 Standard

u SAMP in WDG HTML 3.2 Reference

u SAMP in Learning HTML 3.2 by Examples

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


STRONG - Strong Emphasis

STRONG - Strong Emphasis

Syntax <STRONG>...</STRONG>
Attribute Specifications u common attributes
Contents Inline elements
Contained in Inline elements, block-level elements

The STRONG element gives strong emphasis to its contents. Visual browsers typically render STRONG as bold text, but authors can suggest a rendering using style sheets. Since STRONG is a structural element, it carries meaning, making it preferable to font style elements such as B when strong emphasis is the intended meaning.

For weaker emphasis, use the EM element.

More Information

u STRONG in W3C HTML 4.0 Recommendation

u STRONG in W3C HTML 3.2 Recommendation

u STRONG in HTML 2.0 Standard

u STRONG in WDG HTML 3.2 Reference

u STRONG in Learning HTML 3.2 by Examples

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


VAR - Variable

VAR - Variable

Syntax <VAR>...</VAR>
Attribute Specifications u common attributes
Contents Inline elements
Contained in Inline elements, block-level elements

The VAR element is used to markup variables or program arguments. Visual browsers typically render VAR as italic text, but authors can suggest a rendering using style sheets. Since VAR is a structural element, it carries meaning, making it preferable to font style elements such as I when marking up variables.

Example:

<P>Versions of HTML are typically numbered in an <VAR>x</VAR>.<VAR>x</VAR> format.</P>

More Information

u VAR in W3C HTML 4.0 Recommendation

u VAR in W3C HTML 3.2 Recommendation

u VAR in HTML 2.0 Standard

u VAR in WDG HTML 3.2 Reference

u VAR in Learning HTML 3.2 by Examples

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


B - Bold Text

B - Bold Text

Syntax <B>...</B>
Attribute Specifications u common attributes
Contents Inline elements
Contained in Inline elements, block-level elements

The B element suggests that text be rendered as bold text. In most cases, use of a phrase element such as STRONG is more appropriate since such elements express the meaning of the text more clearly.

The B element is a suitable choice for marking a structure for which no phrase element exists. For example, vectors in mathematics have no structural element in HTML 4.0, but bold text is often an appropriate visual rendering:

If two vectors <B CLASS=vector>v</B> and <B CLASS=vector>w</B> are orthogonal, we write <B CLASS=vector>v</B> &perp; <B CLASS=vector>w</B>.

Note the use of the CLASS attribute to add structural significance to the B elements. This allows greater flexibility when applying style sheets to different kinds of bold text.

More Information

u B in W3C HTML 4.0 Recommendation

u B in W3C HTML 3.2 Recommendation

u B in HTML 2.0 Standard

u B in WDG HTML 3.2 Reference

u B in Learning HTML 3.2 by Examples

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


BIG - Large Font

BIG - Large Font

Syntax <BIG>...</BIG>
Attribute Specifications u common attributes
Contents Inline elements
Contained in Inline elements, block-level elements except PRE

The BIG element suggests that text be rendered in a larger font. In most cases, use of a structural element such as STRONG or a heading (e.g., H3) is more appropriate since these elements express the meaning of the text more clearly. One can suggest that STRONG text be rendered in a larger font with the following Cascading Style Sheet:

STRONG { font-size: larger }

Most browsers support nested BIG elements, but authors should be wary of making significant changes to the font size. Different users have different font sizes, eyesight, and window sizes. Large changes in font size may look right to the author but ridiculous to some users.

More Information

u BIG in W3C HTML 4.0 Recommendation

u BIG in W3C HTML 3.2 Recommendation

u BIG in WDG HTML 3.2 Reference

u BIG in Learning HTML 3.2 by Examples

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


I - Italic Text

I - Italic Text

Syntax <I>...</I>
Attribute Specifications u common attributes
Contents Inline elements
Contained in Inline elements, block-level elements

The I element suggests that text be rendered as italic text. In most cases, use of a phrase element such as EM, DFN, VAR, or CITE is more appropriate since these elements express the meaning of the text more clearly.

The I element is a suitable choice for marking a structure for which no phrase element exists. For example, foreign phrases and taxonomic names have no structural element in HTML 4.0, but italic text is often an appropriate visual rendering:

<H1><I LANG=fr>Chacun son goût !</I></H1>
<P>Some people prefer dogs--<I CLASS=species>Canis familiaris</I>--while others are eternal lovers of cats--<I CLASS=species>Felis cattus</I>.

Note the use of the CLASS and LANG attributes to add structural significance to the I elements. This allows greater flexibility when applying style sheets to different kinds of italic text.

More Information

u I in W3C HTML 4.0 Recommendation

u I in W3C HTML 3.2 Recommendation

u I in HTML 2.0 Standard

u I in WDG HTML 3.2 Reference

u I in Learning HTML 3.2 by Examples

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


SMALL - Small Font

SMALL - Small Font

Syntax <SMALL>...</SMALL>
Attribute Specifications u common attributes
Contents Inline elements
Contained in Inline elements, block-level elements except PRE

The SMALL element suggests that text be rendered in a smaller font. Since HTML 4.0 has no element to indicate de-emphasis, SMALL is often useful for this purpose. For example:

<P><SMALL>Copyright © 1998 Liam Quinn. All rights reserved.</SMALL></P>

Most browsers support nested SMALL elements, but this practice should be avoided. Since different users have different font sizes and eyesight, significant changes in font size can leave text too small to read even though it may look fine to the author.

Using style sheets in place of SMALL provides greater flexibility in changing the presentation. The previous example could also be marked up as follows:

<P CLASS=copyright>Copyright © 1998 Liam Quinn. All rights reserved.</P>

This could then be linked to the following style sheet:

.copyright {
  font-size: smaller;
  text-align: center
}

@media aural {
  .copyright { volume: soft }
}

More Information

u SMALL in W3C HTML 4.0 Recommendation

u SMALL in W3C HTML 3.2 Recommendation

u SMALL in WDG HTML 3.2 Reference

u SMALL in Learning HTML 3.2 by Examples

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


STRIKE - Strike-through Text

STRIKE - Strike-through Text

Syntax <STRIKE>...</STRIKE>
Attribute Specifications u common attributes
Contents Inline elements
Contained in Inline elements, block-level elements

The STRIKE element, deprecated in HTML 4.0, suggests that text be rendered with a strike-through style. In many cases, use of a phrase element such as DEL is more appropriate since such elements express the meaning of the text more clearly. However, since support for DEL among browsers is weak, STRIKE is useful in combination with DEL, as in the following example:

The latest version of HTML recommended by the W3C is HTML <DEL DATETIME="1997-12-19T00:00:00-05:00"><STRIKE>3.2</STRIKE></DEL> <INS DATETIME="1997-12-19T00:00:00-05:00">4.0</INS>.

If DEL is not a suitable structure, style sheets should be used to complement or replace instances of STRIKE. CSS1 provides the text-decoration property for strike-through text.

More Information

u STRIKE in W3C HTML 4.0 Recommendation

u STRIKE in W3C HTML 3.2 Recommendation

u STRIKE in WDG HTML 3.2 Reference

u STRIKE in Learning HTML 3.2 by Examples

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


TT - Teletype Text

TT - Teletype Text

Syntax <TT>...</TT>
Attribute Specifications u common attributes
Contents Inline elements
Contained in Inline elements, block-level elements

The TT element suggests that text be rendered as teletype or monospaced text. In most cases, use of a phrase element such as CODE, SAMP, or KBD is more appropriate since these elements express the meaning of the text more clearly.

Style sheets should be used to complement or replace instances of TT. For example, replacing

<H1><TT>My heading</TT></H1>

with

<H1>My heading</H1>

and

H1 { font-family: monospace }

in a style sheet allows the author to change the presentation of all H1 elements in an entire site by changing just one line in the style sheet.

More Information

u TT in W3C HTML 4.0 Recommendation

u TT in W3C HTML 3.2 Recommendation

u TT in HTML 2.0 Standard

u TT in WDG HTML 3.2 Reference

u TT in Learning HTML 3.2 by Examples

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


U - Underlined Text

U - Underlined Text

Syntax <U>...</U>
Attribute Specifications u common attributes
Contents Inline elements
Contained in Inline elements, block-level elements

The U element, deprecated in HTML 4.0, suggests that text be rendered as underlined text. In most cases, use of a phrase element such as CITE or STRONG is more appropriate since such elements express the meaning of the text more clearly.

Style sheets should be used to complement or replace instances of U. For example, replacing

<H1><U>My heading</U></H1>

with

<H1>My heading</H1>

and

H1 { text-decoration: underline }

in a style sheet allows the author to change the presentation of all H1 elements in an entire site by changing just one line in the style sheet.

More Information

u U in W3C HTML 4.0 Recommendation

u U in W3C HTML 3.2 Recommendation

u U in WDG HTML 3.2 Reference

u U in Learning HTML 3.2 by Examples

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


HTML 4.0 Latin-1 Entities

Latin-1 Entities

The following table gives the character entity reference, decimal character reference, and hexadecimal character reference for 8-bit characters in the Latin-1 (ISO-8859-1) character set. Glyphs of the characters are available at the Unicode Consortium.

Browser support is generally best for the decimal character references, except for the accented characters (decimal 192-214, 216-246, 248-255), where the character entity references hold a slight edge.

Note that most Mac browsers will render fourteen Latin-1 characters incorrectly. These characters are decimal 166, 178, 179, 185, 188, 189, 190, 208, 215, 221, 222, 240, 253, and 254. See ISO-8859-1 and the Mac platform for more information.

Note that hexadecimal character references will cause errors with current validators (except the WDG HTML Validator) since these references are defined in a recent revision to the SGML standard that is not yet supported by most validators.

Character		Entity	Decimal	Hex
no-break space = non-breaking space		&nbsp;	&#160;	&#xA0;
inverted exclamation mark		&iexcl;	&#161;	&#xA1;
cent sign		&cent;	&#162;	&#xA2;
pound sign		&pound;	&#163;	&#xA3;
currency sign		&curren;	&#164;	&#xA4;
yen sign = yuan sign		&yen;	&#165;	&#xA5;
broken bar = broken vertical bar		&brvbar;	&#166;	&#xA6;
section sign		&sect;	&#167;	&#xA7;
diaeresis = spacing diaeresis		&uml;	&#168;	&#xA8;
copyright sign		&copy;	&#169;	&#xA9;
feminine ordinal indicator		&ordf;	&#170;	&#xAA;
left-pointing double angle quotation mark = left pointing guillemet		&laquo;	&#171;	&#xAB;
not sign = discretionary hyphen		&not;	&#172;	&#xAC;
soft hyphen = discretionary hyphen		&shy;	&#173;	&#xAD;
registered sign = registered trade mark sign		&reg;	&#174;	&#xAE;
macron = spacing macron = overline = APL overbar		&macr;	&#175;	&#xAF;
degree sign		&deg;	&#176;	&#xB0;
plus-minus sign = plus-or-minus sign		&plusmn;	&#177;	&#xB1;
superscript two = superscript digit two = squared		&sup2;	&#178;	&#xB2;
superscript three = superscript digit three = cubed		&sup3;	&#179;	&#xB3;
acute accent = spacing acute		&acute;	&#180;	&#xB4;
micro sign		&micro;	&#181;	&#xB5;
pilcrow sign = paragraph sign		&para;	&#182;	&#xB6;
middle dot = Georgian comma = Greek middle dot		&middot;	&#183;	&#xB7;
cedilla = spacing cedilla		&cedil;	&#184;	&#xB8;
superscript one = superscript digit one		&sup1;	&#185;	&#xB9;
masculine ordinal indicator		&ordm;	&#186;	&#xBA;
right-pointing double angle quotation mark = right pointing guillemet		&raquo;	&#187;	&#xBB;
vulgar fraction one quarter = fraction one quarter		&frac14;	&#188;	&#xBC;
vulgar fraction one half = fraction one half		&frac12;	&#189;	&#xBD;
vulgar fraction three quarters = fraction three quarters		&frac34;	&#190;	&#xBE;
inverted question mark = turned question mark		&iquest;	&#191;	&#xBF;
Latin capital letter A with grave = Latin capital letter A grave		&Agrave;	&#192;	&#xC0;
Latin capital letter A with acute		&Aacute;	&#193;	&#xC1;
Latin capital letter A with circumflex		&Acirc;	&#194;	&#xC2;
Latin capital letter A with tilde		&Atilde;	&#195;	&#xC3;
Latin capital letter A with diaeresis		&Auml;	&#196;	&#xC4;
Latin capital letter A with ring above = Latin capital letter A ring		&Aring;	&#197;	&#xC5;
Latin capital letter AE = Latin capital ligature AE		&AElig;	&#198;	&#xC6;
Latin capital letter C with cedilla		&Ccedil;	&#199;	&#xC7;
Latin capital letter E with grave		&Egrave;	&#200;	&#xC8;
Latin capital letter E with acute		&Eacute;	&#201;	&#xC9;
Latin capital letter E with circumflex		&Ecirc;	&#202;	&#xCA;
Latin capital letter E with diaeresis		&Euml;	&#203;	&#xCB;
Latin capital letter I with grave		&Igrave;	&#204;	&#xCC;
Latin capital letter I with acute		&Iacute;	&#205;	&#xCD;
Latin capital letter I with circumflex		&Icirc;	&#206;	&#xCE;
Latin capital letter I with diaeresis		&Iuml;	&#207;	&#xCF;
Latin capital letter ETH		&ETH;	&#208;	&#xD0;
Latin capital letter N with tilde		&Ntilde;	&#209;	&#xD1;
Latin capital letter O with grave		&Ograve;	&#210;	&#xD2;
Latin capital letter O with acute		&Oacute;	&#211;	&#xD3;
Latin capital letter O with circumflex		&Ocirc;	&#212;	&#xD4;
Latin capital letter O with tilde		&Otilde;	&#213;	&#xD5;
Latin capital letter O with diaeresis		&Ouml;	&#214;	&#xD6;
multiplication sign		&times;	&#215;	&#xD7;
Latin capital letter O with stroke = Latin capital letter O slash		&Oslash;	&#216;	&#xD8;
Latin capital letter U with grave		&Ugrave;	&#217;	&#xD9;
Latin capital letter U with acute		&Uacute;	&#218;	&#xDA;
Latin capital letter U with circumflex		&Ucirc;	&#219;	&#xDB;
Latin capital letter U with diaeresis		&Uuml;	&#220;	&#xDC;
Latin capital letter Y with acute		&Yacute;	&#221;	&#xDD;
Latin capital letter THORN		&THORN;	&#222;	&#xDE;
Latin small letter sharp s = ess-zed		&szlig;	&#223;	&#xDF;
Latin small letter a with grave = Latin small letter a grave		&agrave;	&#224;	&#xE0;
Latin small letter a with acute		&aacute;	&#225;	&#xE1;
Latin small letter a with circumflex		&acirc;	&#226;	&#xE2;
Latin small letter a with tilde		&atilde;	&#227;	&#xE3;
Latin small letter a with diaeresis		&auml;	&#228;	&#xE4;
Latin small letter a with ring above = Latin small letter a ring		&aring;	&#229;	&#xE5;
Latin small letter ae = Latin small ligature ae		&aelig;	&#230;	&#xE6;
Latin small letter c with cedilla		&ccedil;	&#231;	&#xE7;
Latin small letter e with grave		&egrave;	&#232;	&#xE8;
Latin small letter e with acute		&eacute;	&#233;	&#xE9;
Latin small letter e with circumflex		&ecirc;	&#234;	&#xEA;
Latin small letter e with diaeresis		&euml;	&#235;	&#xEB;
Latin small letter i with grave		&igrave;	&#236;	&#xEC;
Latin small letter i with acute		&iacute;	&#237;	&#xED;
Latin small letter i with circumflex		&icirc;	&#238;	&#xEE;
Latin small letter i with diaeresis		&iuml;	&#239;	&#xEF;
Latin small letter eth		&eth;	&#240;	&#xF0;
Latin small letter n with tilde		&ntilde;	&#241;	&#xF1;
Latin small letter o with grave		&ograve;	&#242;	&#xF2;
Latin small letter o with acute		&oacute;	&#243;	&#xF3;
Latin small letter o with circumflex		&ocirc;	&#244;	&#xF4;
Latin small letter o with tilde		&otilde;	&#245;	&#xF5;
Latin small letter o with diaeresis		&ouml;	&#246;	&#xF6;
division sign		&divide;	&#247;	&#xF7;
Latin small letter o with stroke = Latin small letter o slash		&oslash;	&#248;	&#xF8;
Latin small letter u with grave		&ugrave;	&#249;	&#xF9;
Latin small letter u with acute		&uacute;	&#250;	&#xFA;
Latin small letter u with circumflex		&ucirc;	&#251;	&#xFB;
Latin small letter u with diaeresis		&uuml;	&#252;	&#xFC;
Latin small letter y with acute		&yacute;	&#253;	&#xFD;
Latin small letter thorn		&thorn;	&#254;	&#xFE;
Latin small letter y with diaeresis		&yuml;	&#255;	&#xFF;

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Symbols and Greek Letters ~ Other Special Characters

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


HTML 4.0 Attributes Values

HTML 4.0 Attribute Values

There are various kinds of attribute values in HTML 4.0. This document describes common types of values.

CDATA

Attribute values of type CDATA are made up of a sequence of characters that may include entities. Line feeds are ignored while each carriage return and tab is replaced with a space. Browsers may ignore leading and trailing whitespace within the attribute value.

CDATA attribute values are typically case-sensitive, though this is not the case with all attributes that take CDATA values.

ID and NAME

Attribute values of type ID and NAME must begin with a letter in the range A-Z or a-z and may be followed by letters (A-Za-z), digits (0-9), hyphens ("-"), underscores ("_"), colons (":"), and periods ("."). These values are case-sensitive.

IDREF and IDREFS

IDREF and IDREFS values refer to values of other elements' ID attributes. An IDREF value is a single ID while an IDREFS value is a space-separated list of IDs. IDREF and IDREFS are case-sensitive.

Number

Number attribute values are numbers made of at least one digit in the range 0-9.

Text

Text attribute values are CDATA values intended to be human readable strings.

URI

URI attribute values are Uniform Resource Identifiers (URIs), as defined in the URI Internet-Draft, a work-in-progress that is expected to replace RFC 1738 and RFC 1808.

URI attribute values may include full URIs such as http://www.htmlhelp.com/ as well as relative URIs such as foo.html and ../foo/.

While parts of a URI may be case-insensitive, in general URI values are case-sensitive.

Color

Color attribute values give a color definition. The value can be any hexadecimal number, specified according to the sRGB color space, or one of sixteen color names. Hexadecimal numbers must be prefixed by a "#" character.

The case-insensitive color names and their sRGB values are as follows:

Note that the hexadecimal form is better supported than the color names for the color attributes of BODY.

Pixels

These attribute values are integers that represent a number of pixels.

Length

Length attribute values may be either an integer--interpreted as a number of pixels--or a percentage of the horizontal or vertical space. The value 50% means half the available space while 50 means 50 pixels.

MultiLength and MultiLengths

MultiLength attribute values may be an integer in pixels, a percentage of the horizontal or vertical space, or a relative length expressed as i* where i is an integer. In allotting space, a browser first allots pixel and percentage lengths, then divides the remaining space among all elements with a relative length. An element with a length of 3* will be allotted three times the space of an element with length 1*. The value * is equivalent to 1* and is often used to mean "fill the remaining space."

A MultiLengths value is a comma-separated list of MultiLength values.

ContentType and ContentTypes

These attribute values are content types (also known as media types or MIME types) of a linked or embedded resource. Values of type ContentType give a single content type while values of type ContentTypes give a comma-separated list of content types. Content types are case-insensitive.

Commonly used content types include text/html, image/jpeg, model/vrml, video/quicktime, application/java, text/css, and text/javascript. Many common content types are registered at the IANA.

LanguageCode

Attribute values of type LanguageCode specify a language code according to RFC 1766. Examples of language codes include en for English, en-US for American English, and ja for Japanese. Whitespace is not allowed in the language code, which is case-insensitive.

Charset and Charsets

These attribute values specify character encodings of linked resources. Values of type Charset give a single character encoding while values of type Charsets give a space- and/or comma-separated list of character encodings. Character encodings are case-insensitive.

Examples of character encodings include ISO-8859-1, SHIFT_JIS, and UTF-8. A list of registered character encodings is available at the IANA.

Character

Character attribute values take a single Unicode character. The character may be specified with an entity.

Datetime

Datetime attribute values give a date and time in the format YYYY-MM-DDThh:mm:ssTZD where YYYY is a four-digit year, MM is a two-digit month (01 through 12), DD is a two-digit day (01 through 31), hh is a two-digit hour (00 through 23), mm is a two-digit minute (00 through 59), ss is a two-digit second (00 through 59), and TZD is the time zone designator. Note that the T separating the date from the time must appear literally and is case-sensitive.

The time zone designator may be one of the following:

u Z (case-sensitive), which indicates Universal Coordinated Time (UTC, basically the same as GMT);

u +hh:mm, the time ahead of UTC in hours and minutes;

u -hh:mm, the time behind UTC in hours and minutes.

If any of the two-digit components of the Datetime value are unknown, 00 should be used.

LinkTypes

Attribute values of type LinkTypes give a space-separated list of link types. A link type is case-insensitive and may not contain whitespace. Each link type may be used any number of times in a given document.

While link types are case-insensitive, the Lynx browser will render LINK elements with the same case as is given in the REL or REV attribute. Authors should therefore be consistent in their case, and may wish to capitalize the first letter while using lowercase for the rest.

The following link types are defined in HTML 4.0, though authors may use other link types. The Made link type, widely used as <LINK REV=Made HREF="mailto:liam@htmlhelp.com"> to provide a contact link for the document author, is notably missing from the list of link types defined in HTML 4.0.

u Alternate specifies an alternate version of the document. When used with the LINK element's HREFLANG attribute, this value implies a translation of the document. When used with LINK's MEDIA attribute, a media-specific version (e.g., for printing) is implied.

u StyleSheet specifies an external style sheet for the document. This link type can be combined with the Alternate link type to define an alternate style sheet for the user to choose.

u Start specifies the first document in a collection.

u Next specifies the next document in a suggested sequence of reading. Browsers such as WebTV will preload documents identified as "next" to improve the perceived load time.

u Prev specifies the previous document in a suggested sequence of reading.

u Contents specifies a table of contents for the document.

u Index gives an index for the document.

u Glossary gives a glossary of terms used in the document.

u Copyright specifies a document with copyright information.

u Chapter specifies the chapter of a collection of documents.

u Section specifies the section of a collection of documents.

u Subsection specifies a subsection of a collection of documents.

u Appendix gives an appendix for the collection of documents.

u Help specifies a help document.

u Bookmark refers to a key related document. The TITLE attribute provides a label for the bookmark.

MediaDesc

Attribute values of type MediaDesc are media descriptors--a comma-separated list of media for which the linked resource is tailored. Media descriptors are case-sensitive.

The following media descriptors are defined in HTML 4.0:

u screen (the default), for non-paged computer screens;

u tty, for fixed-pitch character grid displays (such as the display used by Lynx);

u tv, for television-type devices with low resolution and limited scrollability;

u projection, for projectors;

u handheld, for handheld devices (characterized by a small, monochrome display and limited bandwidth);

u print, for output to a printer;

u braille, for braille tactile feedback devices;

u aural, for speech synthesizers;

u all, for all devices.

Script

Script attribute values are client-side scripts, typically a function call or a few short statements. The value may contain entities (e.g., &quot;).

StyleSheet

Attribute values of type StyleSheet are style sheet data. The value may contain entities.

FrameTarget

Attribute values of type FrameTarget must begin with a letter in the range A-Z or a-z, with the exception of the following special values that begin with an underscore:

u _blank renders the link in a new, unnamed window

u _self renders the link in the current frame (useful for overriding a BASE TARGET)

u _parent renders the link in the immediate FRAMESET parent

u _top renders the link in the full, unframed window

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


HTML 4.0 Font Style Elements

Font Style Elements

u B - Bold text

u BIG - Large text

u I - Italic text

u S - Strike-through text

u SMALL - Small text

u STRIKE - Strike-through text

u TT - Teletype text

u U - Underlined text

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


HTML 4.0 Phrase Elements

Phrase Elements

u ABBR - Abbreviation

u ACRONYM - Acronym

u CITE - Citation

u CODE - Computer code

u DEL - Deleted text

u DFN - Defined term

u EM - Emphasis

u INS - Inserted text

u KBD - Text to be input

u SAMP - Sample output

u STRONG - Strong emphasis

u VAR - Variable

Maintained by Liam Quinn <liam@htmlhelp.com>

 HTML 4.0 Reference ~ Elements by Function ~ Elements Alphabetically

Copyright © 1998 Liam Quinn. All rights reserved.

This help file is created by Gerben Hoekstra <webmaster@weballey.net>.
Visit my web site WEBalley - web publishing for beginners.
This file is freeware and may be distributed freely.


If you can see this, your help file has no topics!


This URL was excluded from the pulldown


The protocol used in this URL is not supported


This URL referenced an unknown protocol


This link was broken while compiling the help file


This URL contained unknown content


Robots are excluded from this URL


This link was not retrieved


This link was skipped because it was either a query string or an invalid URL


This link was skipped at user request